Hi, here is a small equation, Please solve for 2 values of x
Equation is: Tan(x) = x
Let's see who will solve for 2 correct values of x
You mean besides for $\displaystyle x=0$.Originally Posted by rabindraadhi
I can prove a solution exists
This reminds me of a joke:
"A mathematician, physicist and engineer buy a room for a hotel for the night. During the night a fire breaks out, the engineer wakes up, takes a bucket of water and kills the fire then goes back to sleep. A few hours later another fire breaks out during the night. The physicist being smarter than the engineer calculates exaclty how much water is required, throws the water and kills the fire, then goes back to sleep. A few more hours another fire breaks out the mathematician wakes up sees the fire, sees a firehose; says to himself "A solution exists" and then goes back to sleep "
Let me give you the outline. The intermediate value theorem:Originally Posted by c_323_h
"If $\displaystyle f(x)$ is countinuous on $\displaystyle [a,b]$ and $\displaystyle f(a)\leq d\leq f(b)$ then there exists at least one real number $\displaystyle a\leq x\leq b$ such as $\displaystyle f(x)=d$".
Maybe later on I will post the proof. But maybe you can see it from here.
I can prove it, but it's complicated.
$\displaystyle tanx=x$
$\displaystyle \frac{sinx}{cosx}=x$
$\displaystyle sinx=xcosx$
$\displaystyle \sqrt{1-cos^2x}=xcosx$
$\displaystyle 1-cos^2x=x^2cos^2x$
$\displaystyle 0=(x^2+1)cos^2x-1$
Using the quadratic formula:
$\displaystyle cosx=\pm \frac{ \sqrt{4(x^2+1)}}{2(x^2+1)}$
$\displaystyle cosx=\pm \frac{1}{\sqrt{x^2+1}}$
$\displaystyle \sqrt{x^2+1}cosx=\pm 1$
So one possible solution is for +1:
$\displaystyle \sqrt{x^2+1}cosx=1$
Expanding the square root and cosine in a Taylor series about x=0:
$\displaystyle (1+(1/2)x^2-(1/8)x^4+...)(1-(1/2)x^2+(1/24)x^4+...)=1$
$\displaystyle 1-(1/3)x^4+(13/90)x^6+...=1$
$\displaystyle -(1/3)x^4+(13/90)x^6+...=0$
$\displaystyle x^2[-(1/3)x^2+(13/90)x^4+...)=0$
So $\displaystyle x^2=0$ or $\displaystyle -(1/3)x^2+(13/90)x^4+...=0$
So x = 0 is one solution. Note that this is an exact solution despite using the Taylor series because I did not need to truncate the series and the solution is indeed around the x=0 point, so I didn't need to worry about convergence issues.
-Dan ()
For starters, $\displaystyle \sqrt{a^2+b^2} \neq a+b$ in general. You can easily see this if you do it backward:Originally Posted by c_323_h
$\displaystyle (a+b)^2=a^2+2ab+b^2$
So be careful when you take the square root.
Second, in case it escaped anyone's notice, I made my solution to tanx=x FAR more creative and complicated than it had to be. Just having a bit of fun, that's all. I didn't think anyone would take it seriously!
A REAL solution to tanx=x based on my format would be much quicker: To see if there is a solution near x=0, I would again use a Taylor expansion about x=0, but this time on tanx directly:
$\displaystyle tanx=x+(1/3)x^3+(2/15)x^5+...$
So:
$\displaystyle x+(1/3)x^3+(2/15)x^5+(17/315)x^7+...=x$
$\displaystyle (1/3)x^3+(2/15)x^5+(17/315)x^7+...=0$
All of the terms in the power series contain some odd power of x (since tanx is an odd function), so we can factor an x^2 from the left hand side:
$\displaystyle x^2((1/3)x+(2/15)x^3+(17/315)x^5+...)=0$
So either $\displaystyle x^2=0$ or $\displaystyle (1/3)x+(2/15)x^3+(17/315)x^5+...=0$.
So x=0 is a solution.
Obviously, the fastest way to test if x=0 is a solution is to plug it in.
Note: This kind of technique is fairly general, one sees it in Physics alot, but usually doesn't give you anything you don't already know: we can only use it to verify a solution near one we already suspect (else the Taylor series may not converge; convergence should always be checked!) I recommend it only as a last ditch effort to solve an equation! (It can be useful, however, in approximating solutions if you know about where one should be. But if you are going to go through the trouble to do all this, you might as well use a numerical solution on the original equation.)
-Dan