Solving sin(ax)+bx=0: A Step-by-Step Guide for Homework Equations

  • Thread starter lxd
  • Start date
In summary, the equation sin(ax)+bx=0 has no analytic or simple solutions. However, numerical techniques can be used to find solutions for specific values of a and b. Newton-Raphson is a method that can be used to find solutions, but it is not guaranteed to find them.
  • #1
lxd
7
0

Homework Statement



I need to solve an equation of:

Homework Equations



sin(ax)+bx=0, where x is variable, b, and a are given parameters.

The Attempt at a Solution

 
Physics news on Phys.org
  • #2
I do not think you will be able to solve it as x cannot be isolated.You might have to do successive iterations
 
  • #3
lxd said:
I need to solve an equation of:
sin(ax)+bx=0, where x is variable, b, and a are given parameters.

I'm afraid this has neither an analytic solution, nor a simple one. The equation

sin(ax) = -bx

is an example of a transcendental equation, which means that it cannot be solving by standard algebraic methods.

You can picture what this situation is like by considering the graphs of the left- and right-hand sides separately. The function sin(ax) will be periodic with a period of 2(pi)/a , while -bx is a straight line. Depending on what the relative values of a and b are, there may be no intersection points or any finite number of them, the x-coordinates of the intersections being the solutions to the equation.

The solutions for specific values of a and b would be found by numerical techniques. (If you've had differential calculus, you can quickly figure out the condition for the case where there are no solutions. With more effort, you can work out how many solutions there would be for various ratios of a/b.)
 
Last edited:
  • #4
!

thank you very much!
 
  • #5
dynamicsolo said:
The solutions for specific values of a and b would be found by numerical techniques. (If you've had differential calculus, you can quickly figure out the condition for the case where there are no solutions. With more effort, you can work out how many solutions there would be for various ratios of a/b.)

What numerical techniques can be used to get the solution or solutions of the equation ? Could you please give me a example ? Thanks a lot!
 
  • #6
Newton Raphson first comes to mind. Powerful and quick.

Have you also tried to use the power series expansion of sin x? With some aproximations like taking only the first n terms, this can be solvable and then the NR method would work easily. Unless you want a closed form solution. In which case forget the Taylor expansion.
 
  • #7
difference

Thanks! Can I get the solution by using the difference of the equation as acos(ax)=-b when |a|>|b|?
 
Last edited:
  • #8
What do you mean by "the difference of the equation"? As said before, there is no "analytic" solution for a cos(ax)+ b= 0 and, obviously, the same holds for acos(ax)= b.
 
  • #9
unplebeian said:
Newton Raphson first comes to mind. Powerful and quick.

It is, but only under the right circumstances. You need to have an idea of where the zero(es) of your function are and it's rather important to the method that your initial guess for a solution not be at a place where the derivative of the function is close to zero.

A serious problem would develop with our function [sin(ax) + bx] for cases where there are numerous solutions (when |b| is small). Unless your first guess happens to be close enough to one of the zeroes, the next iteration could easily land in the neighborhood of another zero, complicating the convergence to a solution and the search for the complete set of solutions. Worse yet, the iteration could end up at a value where the derivative is nearly zero, which can destroy the ability of the method to converge at all.

There is some amount of literature at this point on the subject of how chaos can erupt in the Newton-Raphson method. It's a nice technique for uncomplicated functions, but the one in question here is not always one of those...

For the purpose of solving the equation under discussion here, it may really be safer in many situations to just look for zeroes of [sin(ax) + bx] graphically.


HallsofIvy said:
What do you mean by "the difference of the equation"?

I believe lxd meant "the derivative". In any case, lxd, it's really unclear how the derivative, a·cos(ax) = -b , is going to help you find solutions to the original equation. Won't that just tell you where the horizontal tangents to the curve are?
 
Last edited:
  • #10
dynamicsolo said:
Won't that just tell you where the horizontal tangents to the curve are?
You are right, it can not help us find the solution.
 
  • #11
lxd said:
You are right, it can not help us find the solution.

Well, in walking around some today and thinking about this a bit, I realized you could apply it together with the Newton-Raphson method to pin down solutions. Another problem with N-R is that it is not a search method for solutions: you have to have some idea already of where you're looking to use it efficiently. Something you could do is use the derivative equation, starting from x = 0, to find the "turning points" in the function [sin(ax) + bx]. Take averages between the x-coordinates of successive turning points and that will give you good estimates for where to start your N-R calculations from. [I won't, at present, guarantee that this is an "iron-clad" approach, though...]

The one limitation with this approach is that the derivative equation, cos(ax) = (-b/a), has an infinite number of solutions for |b|</=|a|, while the function itself has only a finite number of zeroes. So you still have to know when to stop.* One nice feature of the function is that it has odd symmetry, so you only need to calculate the positive zeroes: the negative zeroes just have opposite sign... [Of course, as has been emphasized by multiple posters here now, all of this has to be done numerically.]

*EDIT: D'oh! This is no biggie -- the last solution will be in the vicinity of |b|·x = 1 .
 
Last edited:
  • #12
dynamicsolo said:
Well, in walking around some today and thinking about this a bit, I realized you could apply it together with the Newton-Raphson method to pin down solutions. Another problem with N-R is that it is not a search method for solutions: you have to have some idea already of where you're looking to use it efficiently. Something you could do is use the derivative equation, starting from x = 0, to find the "turning points" in the function [sin(ax) + bx]. Take averages between the x-coordinates of successive turning points and that will give you good estimates for where to start your N-R calculations from. [I won't, at present, guarantee that this is an "iron-clad" approach, though...]
.

Exactly what I wanted to say earlier
 
  • #13
Have any of you tried to plot sin(ax) +bx ? It's a sine wave superimposed on y= bx.

I think the roots are at x=0 and that's it! If b=0 then we already know where the roots are: at n x pi (n= 0, 1, 2, 3...) Otherwise for whatever a and b, the roots are at x= 0

Am I right or just missing a BIG piece of the puzzle
 
  • #14
Did YOU actually plot y= sin(ax) and y= -bx? Yes, if b= 0 then there exist an infinite number of solutions. If |b| is small, then there exist many more solutions than just x= 0. For b positive, y= -bx will not be below y= -1 until x> 1/b. Similarly, as soon as x> -1/b, y will be less than 1. How many times the line y= -bx crosses the curve y= sin(ax) depends upon how large a is.
 
  • #15
HallsofIvy said:
Did YOU actually plot y= sin(ax) and y= -bx? Yes, if b= 0 then there exist an infinite number of solutions. If |b| is small, then there exist many more solutions than just x= 0. For b positive, y= -bx will not be below y= -1 until x> 1/b. Similarly, as soon as x> -1/b, y will be less than 1. How many times the line y= -bx crosses the curve y= sin(ax) depends upon how large a is.

I knew I was missing something!
 
  • #16
unplebeian said:
Have any of you tried to plot sin(ax) +bx ? It's a sine wave superimposed on y= bx.

Actually, I often plot functions discussed in problems, particularly less familiar ones. In this case, it was thinking about the graph that led me to consider the idea of combining the information from the derivative function with the Newton-Raphson method to avoid the difficulty of accidentally ending up in "bad" N-R locations. (It also made me realize that it's pretty straightforward to figure out how far away from the origin the last zeroes of our function will be...)

I think the roots are at x=0 and that's it! If b=0 then we already know where the roots are: at n x pi (n= 0, 1, 2, 3...) Otherwise for whatever a and b, the roots are at x= 0

I imagine you were thinking of larger values of b. When I was fretting about finding all the solutions and avoiding the pitfalls of N-R, I was looking at a plot of sin(10x) + 0.1x . (The trickiest part seems to be catching the zeroes where the climbing curve is just about to clear the x-axis...
 
Last edited:
  • #17
It is more clear now. Firstly, there always has one solution x=0. Secondly, when |a|>|b|, there are more than one solutions than just x=0. I tried the N-R method. The problem is how to find the good initial value of x, because it stops at x=0 frequently. As mentioned by "Unplebeian", the N-R method is not a search method for solutions. Especially, when there are many solutions, N-R method can not find all of the solutions directly.

I do have some figures, but I don't know how to post them at here.
 
  • #18
dynamicsolo said:
*EDIT: D'oh! This is no biggie -- the last solution will be in the vicinity of |b|·x = 1 .

I do not agree that. For example, when b is very small (or b=0), one of the solution is in the vicinity of pi/a (or at pi/a).
 
  • #19
lxd said:
I do not agree that. For example, when b is very small (or b=0), one of the solution is in the vicinity of pi/a (or at pi/a).

I don't deny there is a solution there. There are many more solutions beyond that when |b| is small, the last one which occurs out where I described, where the rising or falling sine curve is finally above or below the x-axis. (For the function I mentioned in my previous post, sin(10x) + 0.1x, there are zeroes out to +/- 9.8805... and +/-9.9095...)
 
Last edited:
  • #20
Unfortunately, I have not yet studied N-R and other stuff (not yet in my syllabus). This problem is quite an interesting one. I plotted some graphs and even the one dynamicsolo suggested, which really shows the big picture.

Ok, from what I see, the sine function now seems to be tilted with an angle equal to line's slope. Let's say if we plot,

y=sin(5x)+0.1x
y=0.1x-1
y=0.1x+1

We'll have the rotated sine function enclosed between both the lines which look similar to a tube.

We know the angle of rotation, so can we define a rotated co-ordinate system where sine function intersects it normally as we see. Can we use these informations to find corresponding intersection in the first co-ordinate system? Also, we'll have to do it only in the domain where the lines intersect +ve and -ve x axis.

Whatever I said is just an idea, I haven't worked up a solution. So it can be technically wrong or impossible that way. I'll try to look into it when I get back home.

Regards,
Sleek.
 
Last edited:
  • #21
Sleek said:
Ok, from what I see, the sine function now seems to be tilted with an angle equal to line's slope...

You want to be a little careful here. The sine curve is not simply rotated, but, because it is "tracking" a rising or falling line, is also distorted asymmetrically. For small values of |b|, the distortion will be rather small and the rotation "model" probably will give fairly good estimates for the zeroes. When |b| is not small relative to |a|
(|b| > 0.01|a| ?), the "waves" of the sine function are sufficiently "warped" that the function can no longer be viewed as just a re-oriented sine function. (Look at sin(10x) + x , for instance.)
 
  • #22
HallsofIvy said:
What do you mean by "the difference of the equation"? As said before, there is no "analytic" solution for a cos(ax)+ b= 0 and...

?

x = Arccos(-b/a)/a
 
  • #23
olgranpappy said:
?

x = Arccos(-b/a)/a

(I see a semantical argument coming...) I think Halls means that there is no simple algebraic way of expressing this solution. What you have is considered a transcendental equation (and I believe HoI knows how to come up with it). Writing the inverse trig expression (we are not merely using the function Arccos(x) here) does not make the infinite number of solutions easier to find. There isn't a straightforward expression for arccos ; you will still need to find the extrema of the function under discussion numerically...
 
Last edited:
  • #24
Actually, I think he just forgot to put an 'x' next to the 'b' in his equation. And I was just pointing that out in an amusing (to me) way.
 
  • #25
olgranpappy said:
Actually, I think he just forgot to put an 'x' next to the 'b' in his equation. And I was just pointing that out in an amusing (to me) way.

What Halls was writing there was the derivative of the original equation, since lxd had brought it up, originally as something to use in solving that equation.
 
  • #26
okey dokey
 
  • #27
olgranpappy said:
?

x = Arccos(-b/a)/a
Actually there is no "symantical argument", just a typographical error. The equation I was referring to is the original equation, cos(ax)+ bx= 0, not cos(ax)+ b= 0. Olgranpappy got me!
 
  • #28
Since we now know how the function looks like, (Halls_of_Ivy blatantly pointed it out!)we may employ a brute force method.

y= sin(ax) +bx. Increase x in small amounts (1e-6) and find y. If y<= epsilon where epsilon is the MATLAB operator 1e-15 (you can set this depending on your accuracy) you know that you have found a root of the equation.

It is a brute force method and can get accurate results, but more time consuming than NR. However the time taken to code the NR may be equal to the time required to solve it the above mentioned way.

BTW thanks to Halls_of_Ivy. Good to be shaken once in a while for not thinking straight.
 
  • #29
You don't have to be that brutal! You were the first one to mention Newton-Raphson which would be my first choice.
 

1. What is the purpose of solving sin(ax)+bx=0?

The purpose of solving sin(ax)+bx=0 is to find the value(s) of x that satisfy the equation. This can be useful in various applications, such as calculating the period or amplitude of a periodic function.

2. What is the first step in solving sin(ax)+bx=0?

The first step is to factor out the common factor of x, leaving the equation in the form of x(sin(ax)+b)=0.

3. What is the next step after factoring out x in sin(ax)+bx=0?

The next step is to set each factor equal to 0 and solve for x. This will give the possible solutions for the equation.

4. Can there be more than one solution to sin(ax)+bx=0?

Yes, there can be multiple solutions to this equation. This is because the sine function is periodic, meaning it repeats itself over a certain interval. Therefore, there may be multiple values of x that satisfy the equation.

5. Are there any special cases to consider when solving sin(ax)+bx=0?

Yes, there are a few special cases to consider. If a=0, then the equation simplifies to bx=0, and the solution is simply x=0. If b=0, then the equation becomes sin(ax)=0, which has infinitely many solutions. Additionally, if a=2kπ (where k is an integer), then the solutions will be the values of x where sin(ax)=-b.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
5
Views
684
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
2
Views
861
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
24
Views
2K
  • Precalculus Mathematics Homework Help
Replies
16
Views
2K
  • Precalculus Mathematics Homework Help
Replies
17
Views
994
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
  • Precalculus Mathematics Homework Help
Replies
18
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
Back
Top