# Point of intersection for sine and cosine functions

1. Mar 8, 2009

### reedy

The problem is finding the points of intersection for two given functions.

$$f1=sin(-\pi*x)$$
$$f2=1+cos(-\pi*x)$$

I've plotted the functions using Maple.

http://dl.getdropbox.com/u/12485/plot.png [Broken]

And I'm quite certain that to find the points of intersection, I have to set
$$f1=f2$$

which gives me

$$sin(-\pi*x)=1+cos(-\pi*x)$$

I need a tip on what to do next.

Last edited by a moderator: May 4, 2017
2. Mar 8, 2009

### HallsofIvy

Staff Emeritus
As you can see from your graph, it looks like the graphs cross when x is an odd integer of and odd integer over 2. Can you show that those must be the roots? What IS sine of an odd integer or an odd integer over 2? What about cosine?

Last edited by a moderator: May 4, 2017
3. Mar 8, 2009

### jgens

You could also try to combine sin(u) - cos(u) equate it to one and then solve.

4. Mar 8, 2009

### reedy

I'm sorry, I'm not sure I got that completely.

How does sine and cosine of an odd integer differ from sine and cosine of an even integer? Is there a rule I'm not aware of?

I do see that the lines cross at $$x_1=-1,x_2=-\frac{1}{2},x_3=1,x_4=1\frac{1}{2}$$

but that is pretty much all I know, and can see.

I did think of that, but I have no idea what to do when there is both sine and cosine in the same equation. $$sin(-\pi*x)-cos(-\pi*x)=1$$

None of the formulas fit!

5. Mar 8, 2009

### jgens

sin(u) - cos(u) = sin(u) - sin(pi/2 - u). Does that help at all?

Additionally, this equation is of the form Asin(u) - Bcos(u) which we can combine in the following manner: Suppose sin(phi) = B/C where C = sqrt(A^2 + B^2). It then follows that A/C = cos(phi). Using these substitutions we can put the equation in the form C(cos(phi)sin(u) - sin(phi)cos(u)). With the help of another trig. identity you can simplify that greatly and hopefully solve the equation.

Hope this helps.

Last edited: Mar 8, 2009
6. Mar 8, 2009

### reedy

I thought it would help...

$$sin(-\pi x)-sin(\frac{\pi}{2}+\pi x)=1$$

Because if they're all sine, maybe I could do the following:

$$-\pi x-\frac{\pi}{2}+\pi x=90$$

But that means I could cross out -PI*x which would leave me with -PI/2=90.

--------

Putting your tip to use, C=1 in my case.

And cos(phi)sin(u) - sin(phi)cos(u) = sin(phi-u)

But what is phi? is tan(phi)=b/a => phi=45?

7. Mar 8, 2009

### jgens

You certaintly cannot just "cancel" the sine functions out. Additionally, you should keep your arguments the same - you appear to switch arguments from radians to degrees in your first example.

C != 1 in this case; in your case A = B = 1 and C = sqrt(A^2 + B^2). To find phi all you need to do is note that cos(phi) = A/C and sin(phi) = B/C; therefore, phi = arcsin(B/C) = arccos(A/C).

Regarding phi = arctan(1) = 45. That is correct but remember to keep your argument the same; given the pi terms in the sine and cosine function I would presume the argument is supposed to be in radians. So 45 degrees equals how many radians?

8. Mar 9, 2009

### reedy

and didn't even think of the radian/degree thing. That leaves us with $$arctan(B/A)=1^\circ\Longleftrightarrow \frac{\pi}{4}rad=\phi$$

So let's break this down.

$$C(cos(\phi)sin(u) - sin(\phi)cos(u))\Longleftrightarrow \\ C*sin(\phi-u)\Longleftrightarrow \\ \sqrt(2) sin(\frac{\pi}{4}-(-\pi x))$$

$$\sqrt(2) sin(\frac{\pi}{4}+\pi x)=1 \Longleftrightarrow sin(\frac{\pi}{4}+\pi x) = \frac{1}{\sqrt 2}$$

This looks great! I know that 1/(sqrt(2) is pi/4, but i'm not sure how to write everything. can i just replace one with the other?

9. Mar 9, 2009

### HallsofIvy

Staff Emeritus
Well, I asked what they were! Did you even check? $sin(n\pi)= 0$ for any integer while cos(npi)= 1 for n even, -1 for n odd.

10. Mar 9, 2009

### reedy

Ohh, you mean like that. Sorry!

Well,

$$sin(3\pi)=0$$
$$sin(2\pi)=0$$
$$sin(1\pi)=0$$

and

$$cos(1\pi)=-1$$
$$cos(2\pi)=1$$
$$cos(3\pi)=-1$$

So what you initially said was indeed correct, and the functions do indeed cross when x is odd; -1, 1, etc.

But how does this help me solve the equation?
----
And I should add, to the original question, that the roots should be in a given interval $$-2<x<2$$

This is what I now have.
$$sin(\frac{\pi}{4}+\pi x) = \frac{1}{\sqrt 2}$$

11. Mar 9, 2009

### jgens

I don't have time to check that sin(pi/4 + pix) = 1/sqrt(2) is correct so I'll assume that it is. What is the general solution for arcsin(sqrt(2)/2)? Write that out and equate it to pi/4 + pix and then solve for x which should be fairly simple at that point.