Solving a First Order DE: y'+ycot(x)=cos(x)

  • Thread starter Thread starter iRaid
  • Start date Start date
  • Tags Tags
    First order
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
iRaid
Messages
558
Reaction score
8

Homework Statement


[tex]y'+ycot(x)=cos(x)[/tex]


Homework Equations





The Attempt at a Solution


First I found the integrating factor:
[tex]\rho (x)=e^{\int cot(x)dx}=e^{ln(sinx)}=sinx[/tex]
Plug into the equation for first order DE...
[tex]\int \frac{d}{dx} ysinx=\int cosxsinx dx[/tex]
End up with:
[tex]ysinx=\frac{-cos^{2}x}{2}+C\\y=\frac{-cosxcotx}{2}+\frac{C}{sinx}[/tex]

I think that's wrong tho..
 
Physics news on Phys.org
iRaid said:

Homework Statement


[tex]y'+ycot(x)=cos(x)[/tex]


Homework Equations





The Attempt at a Solution


First I found the integrating factor:
[tex]\rho (x)=e^{\int cot(x)dx}=e^{ln(sinx)}=sinx[/tex]
Plug into the equation for first order DE...
[tex]\int \frac{d}{dx} ysinx=\int cosxsinx dx[/tex]
End up with:
[tex]ysinx=\frac{-cos^{2}x}{2}+C\\y=\frac{-cosxcotx}{2}+\frac{C}{sinx}[/tex]


I think that's wrong tho..

You have the right answer. But since [itex]\cos^2 x + \sin^2 x = 1[/itex], it follows that [itex](\sin^2 x)' = -(\cos^2 x)'[/itex]. Perhaps it would have been better to take [itex]\sin x \cos x = \frac12(\sin^2 x)'[/itex], since you have [itex](y\sin x)'[/itex] on the other side of the equation.

You can in any event use [itex]\cos^2 x + \sin^2 x = 1[/itex] to simplify your answer:
[tex] \frac{\cos^2 x}{\sin x} = \frac{1 - \sin^2 x}{\sin x} = \frac{1}{\sin x} - \sin x[/tex]