1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Solve Linear ODE Using Integrating Factor

  1. Sep 12, 2013 #1


    User Avatar

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

    Solve the initial value problem:
    $$sin(x)y' + ycos(x) = xsin(x), y(2)= \pi/2$$

    2. Relevant equations

    3. The attempt at a solution

    Recognizing it as a Linear First-Order Equation:$$\frac{dy}{dx}+y\frac{cosx}{sinx}=x$$
    Integrating factor: $$e^{\int \frac{cosx}{sinx}dx}=sinx$$

    Multiplying the ODE by the integrating factor:
    $$\frac{d}{dx}[ysinx] = xsinx$$

    Integrating both sides: $$ysinx = \int xsinx dx$$
    Solving for C: $$C=1$$

    Apparently this solution is incorrect, but I can't figure out why?
  2. jcsd
  3. Sep 12, 2013 #2


    User Avatar
    Homework Helper

    From this line


    you should get

    ysinx = sinx - xcosx +C

    then divide by sinx.
  4. Sep 12, 2013 #3


    User Avatar

    Thanks! When I divided through by ##sin(x)## from the step you suggested, I had forgotten to divide ##C## by ##sin(x)##. I tend to ignore the constants which is a big mistake. Thanks for the help!
  5. Sep 12, 2013 #4


    User Avatar
    Homework Helper
    Gold Member

    maybe you have missed out some steps of what you did, it is not evident that you have worked out your integration factor or multiplied by it.

    You don't need an integration factor and can go straight from line 1 to line 5.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted