Find x0 in Cosinus and Sinus Equations

  • Thread starter Thread starter Dr-NiKoN
  • Start date Start date
AI Thread Summary
To find x0 in the equations f(x) = a * sin(x) and g(x) = b * cos(x), the discussion centers on using trigonometric identities and the relationships between sine and cosine. The values of cos(x0) and sin(x0) are derived from the coordinates of point P = (a, -b) in the fourth quadrant, leading to C = sqrt(a^2 + b^2). The use of arcsin and arccos functions is debated, particularly regarding their ranges and how to determine the correct angle x0. Ultimately, the calculations suggest that x0 is approximately 2.498, and the importance of understanding the quadrant in which x0 lies is emphasized for accurate results. The conversation concludes with a method for finding when f(x) equals g(x) using the tangent function, highlighting the periodic nature of trigonometric solutions.
Dr-NiKoN
Messages
93
Reaction score
0
I tried asking in another forum, but I probably didn't specify enough.

Generally, given:
f(x) = a * sin(x)
g(x) = b * cos(x)

Find f(x) - g(x) using C cos(x - x0):

C cos(x - x0) = a * sin(x) - b * sin(x)

C = sqrt(a^2 + (-b)^2)

cos(x0) = (-b)/C
sin(x0) = a/C

How would one find x0?

As I understand it I must find out which kvadrant the point P = (a,-b) is in.
Given that, I can find a triangle.

ie.
P = (3, -4) is in the 4th kvadrant and gives:
C = sqrt(3^2 + (-4)^2) = 5
cos(x0) = (-4)/5
sin(x0) = 3/5

I'm pretty much lost on how I can use the knowledge of which kvadrant P is in, to find x0.
 
Physics news on Phys.org
Do it the other way:
-b\cos(x)+a\sin(x)=\sqrt{a^{2}+b^{2}}(\frac{-b}{\sqrt{a^{2}+b^{2}}}\cos(x)+\frac{a}{\sqrt{a^{2}+b^{2}}}\sin(x))
Now, remember the formula for cosine:
\cos(x-x_{0})=\cos(x_{0})\cos(x)+\sin(x_{0})\sin(x)
Hence, your angle is determined through the equations:
\cos(x_{0})=-\frac{b}{\sqrt{a^{2}+b^{2}}}
\sin(x_{0})=\frac{a}{\sqrt{a^{2}+b^{2}}}
 
Last edited:
Do you know the arcsin and arccos functions? (Also notated sin-1[/size] and cos-1[/size])
 
What the heck is wrong with Latex today??
 
I can't see the LaTeX graphics :(

Do you know the arcsin and arccos functions? (Also notated sin-1 and cos-1)
Yes, but can I legally use them?
Wouldn't x0 need to be in the range [-PI/2. PI/2] for arcsin and [0, PI] for arccos? How could I use them without knowing that x0 is within that range?

But, ok:
arccos(-4/5) = 2.498
arcsin(3/5) = 0.6435
arctan(3/(-4)) = 0.6435

Where does this leave me?
 
If I cheat, it seems to me that x0 should be around 2.55(just reading from the graph f(x) = 3sin(x) - 4cos(x). )

Is this correct?
 
Yes, but can I legally use them?
Wouldn't x0 need to be in the range [-PI/2. PI/2] for arcsin and [0, PI] for arccos? How could I use them without knowing that x0 is within that range?

arcsin and arccos are functions that operate on any number in the range [-1, 1]. cos x0 is certainly in this range, so you can legally use them.

The problem is that arccos cos x0 won't be x0... you'll always get some other angle, y0 in the first or second quadrant. This isn't the angle you want, but you know that cos y0 = cos x0, and you can use the symmetry and periodicity of cosine to find x0.

Similarly if you choose to use arcsin.
 
The problem is that arccos cos x0 won't be x0... you'll always get some other angle, y0 in the first or second quadrant. This isn't the angle you want, but you know that cos y0 = cos x0, and you can use the symmetry and periodicity of cosine to find x0.
Since I know that x0 should be in the 4th quadrant, and y0 would be in the second, wouldn't the difference just be PI?

No one ever explained this to me, so I'm pretty much going from what I can gather from a textbook.

Is:
x0 = arcsin(3/5) + PI correct?

Anyone care to spell it out, I'm going crazy with this.
 
Hm.
sin(x0) = sin(PI-x0) = 3/5
arcsin(3/5) = 0.6435
sin(PI-x0) = 3/5
arcsin(3/5) = PI-x0
x0 = PI - arcsin(3/5)
x0 = 2.498

cos(x0) = -4/5
arccos(-4/5) = 2.498

f(x) = 3sin(x)
g(x) = -4cos(x)

Show f(x) - g(x) by Acos(x-x0):
S(x) = 5cos(x-2.498)

I still have no idea why x0 = 2.498 or how I can prove it without actually checking what the graph of S(x) looks like.
 
  • #10
Dr-NiKoN said:
But, ok:
arccos(-4/5) = 2.498
arcsin(3/5) = 0.6435
arctan(3/(-4)) = 0.6435

Where does this leave me?

atan(3/(-4))=-0.6435. And it is in the second quadrant as the sin of the angle is positive and the cosine is negative. The period of the tan function is pi (180 degrees) You can add integer multiple of pi to the angle the tangent will be the same. Add pi to -0.6435, it is 2.4980, an angle in the second quadrat.
Any time when you have an angle alpha so as sin(alpha) = a, cos(alpha) = b,
get atan(a/b) first. Simple calculators give the angle in the range (-pi/2; pi/2) (-90 and 90 in degrees). If both a and b are positive, the angle is in the first quadrant and there is no problem. If a is positive and b negative the calculator gives a negative angle with absolute value less than pi/2 (90 degrees). But you know that the angle must be in the second quadrat. You add pi (180 degrees) and it is OK. If both a and b are negative the calculator yields a positive angle less than pi/2 but you know that the angle is in the third quadrat. Add pi again.
If a is negative and b is positive, the angle is in the fourth quadrat between 3/2 pi and 2pi. Your calculator gives a negative angle between -pi/2 and 0. , Add 2pi (60 degrees) in order to get the angle in the fourth quadrant.


ehild
 
  • #11
atan(3/(-4))=-0.6435. And it is in the second quadrant as the sin of the angle is positive and the cosine is negative.
I might be misunderstanding, but the angle -0.6435 can't possibly be in the second quadrant? Wouldn't it move clock-wise from quadrant1?

sin(-0.6435) = -0.6 # sin(v) negative, must be in the third of fourth quadrant.
cos(-0.6435) = 0.8 # cos(v) positive, must be in the 1st or 4th quadrant

Thus, -0.6435 must be in the 4th quadrant.

The period of the tan function is pi (180 degrees) You can add integer multiple of pi to the angle the tangent will be the same. Add pi to -0.6435, it is 2.4980, an angle in the second quadrat
Understood.

Any time when you have an angle alpha so as sin(alpha) = a, cos(alpha) = b,
get atan(a/b) first. Simple calculators give the angle in the range (-pi/2; pi/2) (-90 and 90 in degrees). If both a and b are positive, the angle is in the first quadrant and there is no problem. If a is positive and b negative the calculator gives a negative angle with absolute value less than pi/2 (90 degrees). But you know that the angle must be in the second quadrat.
Why?

Hm, I think I just understood this when reading your post yet another time.
Wouldn't I know that the angle should be in the second quadrant because:
cos(x0) = (-b)/C
sin(x0) = a/C
..
cos(x0) = (-4)/5 ## cos(v) is negative
sin(x0) = 3/5 ## sin(v) is positive

Dear god, I think I finally get it. :)

Thank you so very much, I think finally understand how this works.
 
  • #12
Dr-NiKoN said:
I might be misunderstanding, but the angle -0.6435 can't possibly be in the second quadrant? Wouldn't it move clock-wise from quadrant1?


Negative angle means that the arm of the angle turns clockwise relative to the x axis. But we want to get there anti-clockwise, to get a positive angle. That is we move the arm by (2pi-0.6435) anti-clockwise.

And I am happy that you understand it now... :smile:

ehild
 
  • #13
Ok, just another general query.
Find when:
f(x) = g(x)

Using the numbers above, we get:
5cos(x-2.498) = 0

We know that cos(PI/2) is 0 right?
Thus:
x-2.498 = PI/2
x = (PI/2) + 2.498 = 4.0687

f(x) = 3sin(x) => 3sin(4.0687) = - 2.3998
g(x) = 4cos(x) => 4cos(4.0687) = - 2.40029

Close, but not close enough.

How would one find this more correctly?
Would be (PI/2) + 2.498 be the correct answer, or is there something more specific I'm missing?
 
  • #14
Dr-NiKoN said:
Ok, just another general query.
Find when:
f(x) = g(x)


f(x) = 3sin(x) => 3sin(4.0687) = - 2.3998
g(x) = 4cos(x) => 4cos(4.0687) = - 2.40029

Close, but not close enough.


It is close enough taking your rounding errors into account. The number of significant digits is 4, and the two results agree in four digits. (you have to round 2.3998 up to 2.400 and 2.40029 down to 2.400.)

But:

If the original problem was: find the solutions of the equation

3sin(x) = 4cos(x)

then it would have been much easier to get the tangent of x directly from this equation.
tan(x) =4/3
the calculator gives the value atan(4/3) = 0.9272952
You have to add k*pi to this because of the periodicity of the tan(x) function. k can be any positive or negative integer. So you should write the solution in the form:

x = 0.9272952 + k*pi , k integer.

Of course you can write it out with less digits.


So x can be 0.9272952 or -2.2142974 or 4.0688879 or... Plug these values back and you will be surprised.
:smile:

ehild
 
Back
Top