ID:190803
 
Does anyone know how to solve an equation like this for x?

Pi/2 = x - sin(x)

I can graph it and find x but I want to know if you can do it using algebra. I would like to assume you can but I can't see how.
English wrote:
Does anyone know how to solve an equation like this for x?

Pi/2 = x - sin(x)

I can graph it and find x but I want to know if you can do it using algebra. I would like to assume you can but I can't see how.

If you want to solve it analytically, you can't. It's a transcendental equation, and is actually a form of Kepler's equation of elliptical motion (x = M + E sin(x) where M is Pi/2 and E is 1 in your case). I've been dealing with stuff sort of like this at work lately (satellite orbital mechanics) and thankfully it can be solved pretty easily using a numerical method coded into a computer program. My personal favorite is the Newton-Raphson method (look it up at Google for more info) but many others would be suitable.

Ah what the heck, I just coded it up for fun:
mob/verb/solve(guess as num)
var/pi2 = 3.1415926536 / 2
var/rad2deg = 90 / pi2
var/limit = 0.00001 // convergence limit
var/ans = guess
var/iterations = 0

while (!iterations || abs(guess - ans) > limit)
guess = ans
var/f = guess - pi2 - sin(guess * rad2deg)
var/fprime = 1 - cos(guess * rad2deg)
if (!fprime) // check for divide by zero condition
fprime = 1 // this effectively resets the guess for the next loop
ans = guess - (f / fprime)
iterations++

src << "The answer is [num2text(ans,10)] after [iterations] iteration\s"

For this routine, you need to give it an initial guess (the verb argument) and it will go from there. Play around with different initial guesses and see how it changes the number of necessary iterations (generally, the closer it is to the true answer, the fewer iterations it will take to converge - but not always in this case if you start with huge guesses).

Well, that was fun, time for bed.
In response to Air Mapster
This was actually derived for a problem dealing with cylinders and volume. The problem is that you have a cylinder lying on its side with a hole in the top and you have a long stick. You are supposed to find out where to mark your stick so you can tell when the cylinder is 1/4 full (volume, not height). I work in a math tutoring center and someone in math analysis/trigonometry asked this question so we couldn't use calculus to solve the problem. I basically found the area covered by the liquid on one side of the cylinder by finding the area of the sector of the circle using A = 1/2*theta*r^2 and subtracting the area of the isosolese triangle in that sector.

I ended up with that equation for the angle describing the sector (so x was actually theta) which makes finding what we actually wanted very easy (if you can actually solve for the angle).

I got the answer by setting it equal to zero and graphing it, then finding the root. It ended up as the right answer but I'm not sure if they were supposed to use a calculator to find the answer.

Thanks for the input, I'll have to look into what you said a little more because I've seen this sort of thing before. I think it was when I was talking to Lummox about finding equations for population growth by creating the derivative you want, then integrating it to get the actual equation. We ended up with a scenerio like that where the variable was both inside and outside of a trigonometric function.