# A Very simple equation

• Mar 6th 2006, 10:31 PM
A Very simple equation
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
• Mar 7th 2006, 03:56 AM
CaptainBlack
Quote:

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

If you are satisfied with numerical solutions to say up to 12 significant
digits then these can be provided. Otherwise you are probably out of luck.

RonL
• Mar 7th 2006, 02:15 PM
ThePerfectHacker
Quote:

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 $x=0$.
I can prove a solution exists :D

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 :D "
• Mar 8th 2006, 08:12 AM
c_323_h
Quote:

Originally Posted by ThePerfectHacker
You mean besides for $x=0$.
I can prove a solution exists :D

do you mind if you show us the proof? i think it would be interesting
• Mar 8th 2006, 02:25 PM
ThePerfectHacker
Quote:

Originally Posted by c_323_h
do you mind if you show us the proof? i think it would be interesting

Let me give you the outline. The intermediate value theorem:
"If $f(x)$ is countinuous on $[a,b]$ and $f(a)\leq d\leq f(b)$ then there exists at least one real number $a\leq x\leq b$ such as $f(x)=d$".

Maybe later on I will post the proof. But maybe you can see it from here.
• Mar 9th 2006, 04:56 AM
topsquark
I can prove it, but it's complicated.

$tanx=x$

$\frac{sinx}{cosx}=x$

$sinx=xcosx$

$\sqrt{1-cos^2x}=xcosx$

$1-cos^2x=x^2cos^2x$

$0=(x^2+1)cos^2x-1$

$cosx=\pm \frac{ \sqrt{4(x^2+1)}}{2(x^2+1)}$

$cosx=\pm \frac{1}{\sqrt{x^2+1}}$

$\sqrt{x^2+1}cosx=\pm 1$

So one possible solution is for +1:
$\sqrt{x^2+1}cosx=1$

Expanding the square root and cosine in a Taylor series about x=0:
$(1+(1/2)x^2-(1/8)x^4+...)(1-(1/2)x^2+(1/24)x^4+...)=1$

$1-(1/3)x^4+(13/90)x^6+...=1$

$-(1/3)x^4+(13/90)x^6+...=0$

$x^2[-(1/3)x^2+(13/90)x^4+...)=0$

So $x^2=0$ or $-(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 (:p)
• Mar 9th 2006, 05:14 AM
topsquark
Quote:

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

So, rabindraadhi, all kidding aside, what is your other correct value of x? If there's a simple solution to it, I think we'd all like to see it.

-Dan
• Mar 9th 2006, 05:46 AM
CaptainBlack
Quote:

Originally Posted by topsquark
So, rabindraadhi, all kidding aside, what is your other correct value of x? If there's a simple solution to it, I think we'd all like to see it.

-Dan

One is close to 4.4934094579 :D

RonL
• Mar 9th 2006, 06:18 AM
c_323_h
$sin^2 + cos^2 = 1$

so can you take the square root of both sides to get

$sin + cos = 1$?

or is this illegal?
• Mar 9th 2006, 12:01 PM
topsquark
Quote:

Originally Posted by c_323_h
$sin^2 + cos^2 = 1$

so can you take the sqare root of both sides to get

$sin + cos = 1$?

or is this illegal?

For starters, $\sqrt{a^2+b^2} \neq a+b$ in general. You can easily see this if you do it backward:
$(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:
$tanx=x+(1/3)x^3+(2/15)x^5+...$
So:
$x+(1/3)x^3+(2/15)x^5+(17/315)x^7+...=x$

$(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:
$x^2((1/3)x+(2/15)x^3+(17/315)x^5+...)=0$

So either $x^2=0$ or $(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