# Derivatives of trigonometric functions

1. Apr 22, 2010

### TsAmE

1. The problem statement, all variables and given/known data

Find the constants A and B such that the function y = Asinx + Bcosx satisfies the differential equation y'' + y' - 2y = sinx

2. Relevant equations

None

3. The attempt at a solution

My attempt: y = Asin x + Bcosx

y' = Acosx - Bsinx

y'' = - Asin x - Bcosx

y'' + y' - 2y = sin x
- Asinx - Bcosx + Acosx - Bsinx - 2Asinx + 2Bcosx = sinx
- 3Asinx + Bcosx + Acosx - Bsinx = sinx...

I dont know if my working out is correct, but I couldnt figure out what to do from there.

2. Apr 22, 2010

### Mr.Miyagi

You're almost there.

Now factorize the sines and the cosines: (-3A-B)sinx + (-3B+A)cosx=sinx.

For this to be true we must have -3A-B=1 and -3B+A=0.

I think you'll be able to take over from here, right?

edit: Oops, thanks radou. Equations have been corrected

Last edited: Apr 22, 2010
3. Apr 22, 2010

"+ 2Bcosx " sold be "- 2Bcosx".

4. Apr 22, 2010

### TsAmE

Howcome you spilt the equations into 2? and why does the one equal 1 and the other equal 0? Aren't they suppose to represent the rads of the sin and cos graph?

5. Apr 22, 2010

### Gavins

You have (-3A-B)sinx + (-3B+A)cosx = 1sinx + 0cosx.

This equation has to hold for all x. So the only way this will work is if you have -3A-B = 1 and -3B+A=0.

6. Apr 23, 2010

### TsAmE

Oh ok that sort of makes sense. What rule is this by the way? Cause I have never heard it when doing trig before

Edit: Nevermind I understand now :) Thanks

Last edited: Apr 23, 2010
7. Apr 23, 2010

### gabbagabbahey

Whenever you have two orthogonal functions $f(x)$ and $g(x)$, and an equation of the form $\alpha f(x)+\beta g(x)=\gamma f(x)+\delta g(x)$, the only way it can be satisfied for all $x$ is if $\alpha=\gamma$ and $\beta=\delta$.This can be proved using the definition of orthogonality. Sin(x) and Cos(x) are orthogonal functions.

If you are unfamiliar with orthogonality of functions, you can also prove that $\alpha\sin x+\beta\cos x=0$ can only hold for all $x$ if $\alpha=0$ and $\beta=0$ by differentiating the equation, and solving the system of two equations (the original and the differentiated one), for your two unknowns.