# Homework Help: Cosinus and sinus

1. Sep 15, 2004

### Dr-NiKoN

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.

2. Sep 15, 2004

### arildno

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: Sep 17, 2004
3. Sep 15, 2004

### Hurkyl

Staff Emeritus
Do you know the arcsin and arccos functions? (Also notated sin-1 and cos-1)

4. Sep 15, 2004

### arildno

What the heck is wrong with Latex today??

5. Sep 15, 2004

### Dr-NiKoN

I can't see the LaTeX graphics :(

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?

6. Sep 15, 2004

### Dr-NiKoN

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?

7. Sep 15, 2004

### Hurkyl

Staff Emeritus
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.

8. Sep 15, 2004

### Dr-NiKoN

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.

9. Sep 15, 2004

### Dr-NiKoN

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. Sep 15, 2004

### ehild

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. Sep 16, 2004

### Dr-NiKoN

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.

Understood.

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:
Dear god, I think I finally get it. :)

Thank you so very much, I think finally understand how this works.

12. Sep 16, 2004

### ehild

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...

ehild

13. Sep 16, 2004

### Dr-NiKoN

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. Sep 16, 2004

### ehild

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.

ehild