How Can I Solve This Differential Equation Involving Trigonometric Functions?

jasonbot
Messages
16
Reaction score
0

Homework Statement



Hi, I'm struggling with a differential equations:


y'=(1-y)cosx

Homework Equations





The Attempt at a Solution




y'=cosx-ycosx

p(x)=e^(∫-cosxdx)
=e^-sinx

y'e^-sinx=e^(-sinx)cosx-e^(-sinx)ycosx

then I get confused because of the derivative.

I thought it could be
y'e^(-sinx)=d/dx(e^(-sinx)y) but that clearly doesn't work...
 
Physics news on Phys.org
Separation of variables might be a good approach here... you can show that the solution is given by

\int \frac{1}{1 - y} \, dy = \int \cos(x) \, dx

and both of the integrals are well calculable.
 
If you want to use an integrating factor, you need to move the y's to the same side.

y'+(\cos x)y = \cos x

When you multiply through by the integrating factor p(x), the LHS becomes the derivative of p(x)y(x).

\mbox{LHS} = p(x)y'(x)+p'(x)y(x) = [p(x)y(x)]'

That's where the y' term goes.
 
Gah! My bad :( I feel quite stupid now... The exercise is on integrating factors and I didn't see that O_o
Thanks vela for clearing up integrating factors for me :D

so to continue...

∫1/(1-y)dy=∫cosxdx

-ln(1-y)=sinx+c

1-y=Ae^(-sinx), A=e^c

-y=Ae^(-sinx)-1
y=-Ae^(-sinx)+1

which according to the solution is correct. Thanks guys! It's actually an IVP but I'll just leave that out since it's easy.
 
Note that what you are doing now is separation of variables.
To use integrating factors, you should proceed along vela's lines.
 
I did note that, it's just easier this way. Thanks CompuChip
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...

Similar threads

Back
Top