I’m working on a project … I want to solve the following equation x cos(x)=sin(x) on the interval [0,2pi]wolframalpha gave only numbers but is there any proper analytical solution?
No there isn't. Your equation reduces to tan(x) = x and there is no solution in terms of elementary operations. i.e. you can't separate out and isolate x. Having said that it's clear, by inspection, that x = 0 is a solution. But there is also another solution between 0 and 2pi. The best you can do is set up an iterative process (Bisection or Newton's Method) to get an approximate solution to the desired accuracy.
If you graph y = x and y = tan(x) on the same plot you can see x := 4.49341 is an approximate solution in [0,2pi]