Help on first order differential equation!

Maths and statistics discussion, revision, exam and homework help.

This thread is sponsored by:
Announcements Posted on
Important: please read these guidelines before posting about exams on The Student Room 28-04-2013
Sign in to Reply
  1. Sifr's Avatar
    • Benevolent Member
    • Location: london
    • Posts: 620
    Help on first order differential equation!
    Solve

    Cosx(dy/dx) + ysinx = cosxsin2x , y(0) = 1

    Can I get a step by step guide as to how to solve this? I've kind of forgotten how to,

    What I've done so far:
    Get into form: dy/dx + P(x)y = Q(x)

    So I have:
    dy/dx + ytanx = sin2x

    Integrating factor is: e^ Int(P(x))
    = 1/cosx
    (skipped the calculations here)

    Where do I go from here? A step by step guide would be much appreciated!!

    Thank you
    Last edited by Sifr; 18-04-2012 at 22:58.
  2. Intriguing Alias's Avatar
    • TSR Idol
    • Location: Yorkshire
    Re: Help on first order differential equation!
    (Original post by Sifr)
    Solve

    Cosx(dy/dx) + ysinx = cosxsin2x , y(0) = 1

    Can I get a step by step guide as to how to solve this? I've kind of forgotten how to,

    What I've done so far:
    Get into form: dy/dx + P(x)y = Q(x)

    So I have:
    dy/dx + ytanx = sin2x

    Integrating factor is: e^ Int(P(x))
    = 1/cosx
    (skipped the calculations here)

    Where do I go from here? A step by step guide would be much appreciated!!

    Thank you
    Integrating factor = I

    Iy = \int IQ(x) dx
  3. Sifr's Avatar
    • Benevolent Member
    • Location: london
    • Posts: 620
    Re: Help on first order differential equation!
    (Original post by hassi94)
    Integrating factor = I

    Iy = \int IQ(x) dx
    Why do we ignore the P(x)y ?
  4. bcrazy's Avatar
    • Respected Member
    • Location: London
    • Posts: 170
    Re: Help on first order differential equation!
    Once you have the integrating factor then really what you want do is to multiply both sides of the equation by it, in your case to get:
    (1/cosx)*dy/dx + y*(1/cosx)*tanx = sin2x/cosx

    The reason this is useful is because the LHS is now actually (y/cosx)' (ie. I(x)*y)

    You can then integrate both sides with respect to x (the LHS will just be y/cosx, the RHS looks a bit nasty but I'll leave that to you!)
  5. Intriguing Alias's Avatar
    • TSR Idol
    • Location: Yorkshire
    Re: Help on first order differential equation!
    (Original post by Sifr)
    Why do we ignore the P(x)y ?
    By using an integrating factor of e^int(p(x)) what we've actually done is made it possible to represent the LHS as one derivative.

    If we multiply both sides by I, we get:

    (1/cosx)(dy/dx) + y(1/cosx)tanx = sin2x/cosx

    Which can be written as d/dx(y/cosx) = sin2x/cosx

    You can use the product rule to find d/dx(y/cosx) if you want to show yourself that it works.

    Then we just integrate both sides w.r.t. x
    Last edited by Intriguing Alias; 18-04-2012 at 23:26.
  6. porkstein's Avatar
    • Exalted and Worshipped Member
    • Location: UK
    • Posts: 980
    Re: Help on first order differential equation!
    (Original post by hassi94)
    You can use the chain rule to find d/dx(y/cosx) if you want to show yourself that it works.
    *Product rule.
  7. Intriguing Alias's Avatar
    • TSR Idol
    • Location: Yorkshire
    Re: Help on first order differential equation!
    (Original post by porkstein)
    *Product rule.
    Woops I'm getting tired Thanks for that
  8. Sifr's Avatar
    • Benevolent Member
    • Location: london
    • Posts: 620
    Re: Help on first order differential equation!
    (Original post by bcrazy)
    Once you have the integrating factor then really what you want do is to multiply both sides of the equation by it, in your case to get:
    (1/cosx)*dy/dx + y*(1/cosx)*tanx = sin2x/cosx

    The reason this is useful is because the LHS is now actually (y/cosx)' (ie. I(x)*y)

    You can then integrate both sides with respect to x (the LHS will just be y/cosx, the RHS looks a bit nasty but I'll leave that to you!)
    Why does the LHS become y/ cosx ?
  9. bcrazy's Avatar
    • Respected Member
    • Location: London
    • Posts: 170
    Re: Help on first order differential equation!
    (Original post by Sifr)
    Why does the LHS become y/ cosx ?
    Sorry- that was (y/cosx)' which was my notation for the differential of y/cosx with respect to x.
    This is a case where it isn't immediately obvious it can be written in this form but you can differentiate this to check (and with integrating factor, getting the left hand side as the differential of something is always what you are trying to do and the method will always deliver this).

    The reason for the method is below:

    We want to change the equation of the form dy/dx + P(x)y=Q(x) into something of the form
    d/dx (something*y) = ....
    so that we can then integrate both sides, and to do this we will multiply both sides by an "integrating factor", call it R(x).

    This would give us R(x)dy/dx + R(x)P(x)y = R(x)Q(x) [Equation 1]

    Using the product rule, d/dx (R(x)y) = R(x)dy/dx + dR/dx * y [Equation 2]

    Comparing the LHS of Equation 1 with the RHS of Equation 2, they will be the same if R(x)*P(x) = dR/dx
    Using the method of separating variables, you can solve this to get
    R(x)=e^Int(P(x))

    So if you use this as your integrating factor then you will end up with a LHS that is equal to the LHS of equation 2.

    There is a lot going on here and I have just discover how hard this is to explain without talking as well but hopefully that might make some sense as to why you do what you do. I think the Wiki page might have had an explanation which is probably more eloquent than mine so have a look at that as well!
  10. Intriguing Alias's Avatar
    • TSR Idol
    • Location: Yorkshire
    (Original post by bcrazy)
    Sorry- that was (y/cosx)' which was my notation for the differential of y/cosx with respect to x.
    This is a case where it isn't immediately obvious it can be written in this form but you can differentiate this to check (and with integrating factor, getting the left hand side as the differential of something is always what you are trying to do and the method will always deliver this).

    The reason for the method is below:

    We want to change the equation of the form dy/dx + P(x)y=Q(x) into something of the form
    d/dx (something*y) = ....
    so that we can then integrate both sides, and to do this we will multiply both sides by an "integrating factor", call it R(x).

    This would give us R(x)dy/dx + R(x)P(x)y = R(x)Q(x) [Equation 1]

    Using the product rule, d/dx (R(x)y) = R(x)dy/dx + dR/dx * y [Equation 2]

    Comparing the LHS of Equation 1 with the RHS of Equation 2, they will be the same if R(x)*P(x) = dR/dx
    Using the method of separating variables, you can solve this to get
    R(x)=e^Int(P(x))

    So if you use this as your integrating factor then you will end up with a LHS that is equal to the LHS of equation 2.

    There is a lot going on here and I have just discover how hard this is to explain without talking as well but hopefully that might make some sense as to why you do what you do. I think the Wiki page might have had an explanation which is probably more eloquent than mine so have a look at that as well!
    Think that was as good as explanation gets except the bolded is wrong. Assuming a typo
  11. bcrazy's Avatar
    • Respected Member
    • Location: London
    • Posts: 170
    Re: Help on first order differential equation!
    (Original post by hassi94)
    Think that was as good as explanation gets except the bolded is wrong. Assuming a typo
    Thanks, but am I being thick here- what is wrong about the bit in bold? The integrating factor should be e to the power of the integral of P(x)? No?
  12. Intriguing Alias's Avatar
    • TSR Idol
    • Location: Yorkshire
    (Original post by bcrazy)
    Thanks, but am I being thick here- what is wrong about the bit in bold? The integrating factor should be e to the power of the integral of P(x)? No?
    Wow sorry I thought that said ln as in log
Sign in to Reply
Share this discussion:  
Article updates
Moderators

We have a brilliant team of more than 60 volunteers looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Reputation gems:
The Reputation gems seen here indicate how well reputed the user is, red gem indicate negative reputation and green indicates a good rep.
Post rating score:
These scores show if a post has been positively or negatively rated by our members.