How Can I Solve This Differential Equation Involving Trigonometric Functions?

Click For Summary

Homework Help Overview

The discussion revolves around solving a differential equation involving trigonometric functions, specifically the equation y'=(1-y)cosx. Participants explore various methods for approaching the problem, including separation of variables and integrating factors.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Participants discuss attempts at rewriting the equation and express confusion regarding the application of integrating factors. Some suggest separation of variables as a viable method, while others clarify the steps involved in using integrating factors.

Discussion Status

There is an ongoing exploration of different methods to solve the differential equation. Some participants have provided guidance on using integrating factors and separation of variables, but there is no explicit consensus on the preferred approach. The discussion includes acknowledgment of the problem's context as an initial value problem (IVP).

Contextual Notes

Participants note that the exercise focuses on integrating factors, and there is mention of confusion regarding the setup of the equation. The original poster expresses a realization about the nature of the problem after receiving feedback.

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
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
9
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K