Solving trig/algebric equations

  • Thread starter eptheta
  • Start date
  • #1
65
0

Main Question or Discussion Point

I was finding areas between random lines to pass time when i encountered an equation i could not solve....

7sin(x)=x+1

Do i have to replace sin(x) with the taylor series equivalent
29cb648e96291f52707c7225630c1a17.png


Or is there another way to solve it ?

Thank you.
 

Answers and Replies

  • #2
Mentallic
Homework Helper
3,798
94
You can only get an analytical solution at best, i.e. a good approximation for x.
 
  • #3
65
0
You can only get an analytical solution at best, i.e. a good approximation for x.
Sure, I'm looking for a good approximation... Would it involve plotting the function f(x)=7sin(x)-x-1 on a graph and picking points on the x axis or is there a mathematical method to solve something like this...

How would you solve it ?
 
  • #4
Mentallic
Homework Helper
3,798
94
Oh ok as long as we're clear we can't solve this algebraically :smile:

Yes you would use the function f(x)=7sin(x)-x-1 and to find a good approximation for this function, I'd probably use "[URL [Broken] method[/URL].
 
Last edited by a moderator:
  • #5
65
0
Unfortunately I don't really know what to do to solve it.... Could you solve this specific example using Newton's method ?
If it is too long, then perhaps you could get me started in the right direction (the Wikipedia article fried my brain, I'm not even in college...)

Thank you.
 
  • #6
Mentallic
Homework Helper
3,798
94
Yes it definitely works for this problem.

It is defined as follows:

[tex]x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}[/tex]

[itex]x_n[/itex] is your first estimated solution, and then [itex]x_{n+1}[/itex] will be your next more closely approximated solution (as long as you use a value of x that is close enough to the actual value).

Now, [tex]f(x)=7sinx-x-1[/tex] has 5 real roots so depending on which root you're looking for, choose an x that is quite close to it to begin with. Keep applying Newton's method and it should give you a very good approximation pretty quickly.
 
  • #7
65
0
Wow ! That was fast... Thanks a lot !
I have one more question though...

I used Newton's method for some random polynomials like x3+4x2-3x+4=0 (easily done on a calculator, but this was more fun) keeping my xn as 0....
Finding my first value (x=-4.8) I used long division to divide my expression by (x+4.8) and then used Newton's method for the remaining polynomial, thus finding all the 3 factors of the expression...

However, I am confused when it comes to my previous function...
How do i get all 5 values of x for f(x)=7sin(x)-x-1 ?
Do I use Newton's method to find the first factor and then change my f(x) to:
f(x)=(7sin(x)-x-1)/(x-a) [where a is the first factor i get]
and then use the method again and again...

I have not tried this yet because differentiating it will become progressively more painful...
Will this work and/or is there any other way to get all 5 factors ?

Thanks
 
  • #8
Mentallic
Homework Helper
3,798
94
You couldn't have found the other factors of that cubic... you divided by an approximation for the real root. [tex]x\approx -4.8[/tex] but really, the exact value of x is irrational and expressing it is complicated.
For example, say we have the function y=x-1, if we divide that by x-(1+0.001) then we now have some rational function which still has a root of 1 and instead now has a vertical asymptote at x=1+0.001.

Since your equation is mixed with trig and algebra, we can't solve the roots algebraically so the best we can do is get a good approximation, which means we can't divide by the root in order to simplify the expression.

The best way would probably be to use a graphing calculator or a carefully drawn diagram of the functions y=7sin(x) and y=x+1 to give yourself a good starting point to find where the roots lie approximately, at which point you can use newton's method again.
 
  • #9
65
0
Darn, that's too bad, I'm never too good with graphic approximations...

Is there a threshold range for which Newton's method will return a particular value of x?
That is, if f(x)=sin(x), what is the range of values for xn for which Newton's method will give me x=0 and not jump to x=+[tex]\pi[/tex] or x=-[tex]\pi[/tex]

Is there a derivation for this range based on the function f(x) ?

Thanks
 
  • #10
65
0
Mentallic? have any idea how close the first approximation needs to be to the actual value to get the correct one ?
 
  • #11
Mentallic
Homework Helper
3,798
94
Darn, that's too bad, I'm never too good with graphic approximations...
If you haven't got a graphing calculator handy and just have no chance of getting a decent approximation by hand-drawing it, you can use the intermediate value theorem. This is pretty simple. Say you have y=x2-2 and want to find where y=0, thus x=sqrt(2), by your graph you estimate it is between 1 and 2, checking to make sure, you find the value of y at x=1, f(1) and notice that it is less than zero, so you check f(2) and notice it is more than zero. So this means the root is somewhere in between x=1 and x=2, take x=1.5, it is slightly more, so take x=1.25, slightly less... so take half way between 1.25 and 1.5.. etc. It's a slow process but it will give you a good head start to kick off your newton's method approximation.

Is there a threshold range for which Newton's method will return a particular value of x?
That is, if f(x)=sin(x), what is the range of values for xn for which Newton's method will give me x=0 and not jump to x=+[tex]\pi[/tex] or x=-[tex]\pi[/tex]

Is there a derivation for this range based on the function f(x) ?

Thanks
I don't believe there is. The way newton's method works is that with your first approximation, it finds where the function actually is at that x value, and then calculates the x value of the tangent line that cuts the x-axis. This is the next approximation and it just keeps doing this over and over.
Say for sin(x), if you take [itex]x=\pi/4\approx0.78[/itex] as your first approximation, then newton's will bring back the value [itex]x=\pi/4-1\approx -0.21[/itex] and it is clear that since the second value brought back something closer to the true root, it will converge to x=0. If you took say [itex]x=\pi/2-0.001[/itex] then the tangent line from this point is nearly flat so it will reach a very long distance before touching the x-axis again to give the next approximation. Your next value would be [itex]x\approx -998[/itex] so obviously you're screwed here. But you can even take x=4.5 and return x=-0.1 so yeah, just keeping the rule of thumb that you need a decent first approximation will come in handy. It really depends on the function too,

say, you want to find the root x=0 of [tex]y=x^{1/3}[/tex] then applying newton's method: [tex]x_{n+1}=x_n-\frac{x_n^{1/3}}{\frac{1}{3}x_n^{-2/3}}=x_n-3x_n=-2x_n[/tex] So whatever first value you use, the next will always double and become negative of it, thus never converging to 0.
 

Related Threads for: Solving trig/algebric equations

  • Last Post
Replies
10
Views
792
Replies
10
Views
25K
Replies
7
Views
673
  • Last Post
Replies
8
Views
3K
  • Last Post
Replies
12
Views
2K
  • Last Post
Replies
14
Views
2K
Replies
7
Views
4K
  • Last Post
Replies
6
Views
2K
Top