Results 1 to 9 of 9

Math Help - Find the solution of the given differential equation: dy/dx+(cosx)y=2xy where y(0)=-2

  1. #1
    Member
    Joined
    Oct 2010
    Posts
    127

    Find the solution of the given differential equation: dy/dx+(cosx)y=2xy where y(0)=-2

    Find a solution to the given differential equation: y'+(cosx)y=2xy where y(0)=-2

    Let p(x)=cosx
    Let g(x)=2xy
    Let mu(x)=e^(integral of cosx)=e^sinx
    e^sinx(y')+e^sinx(cosx)y=e^sinx(2xy)
    Integral of (e^sin(x)y)' dx= Integral of e^(sinx)2xy dx
    But then I realized I couldn't further simplify the integral on the right hand side. So how do I find C?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,504
    Thanks
    1400
    If you rewrite this as

    y' = [2x - cos(x)]y

    y'/y = 2x - cos(x)

    the equation is separable.


    Alternatively you can write it as

    y' + [cos(x) - 2x]y = 0

    and use the Integrating Factor method since it's also first-order linear.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Oct 2010
    Posts
    127
    never mind. I got it using separation of variables.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,504
    Thanks
    1400
    You're welcome ><
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Oct 2010
    Posts
    127
    So if I use separation of variables:
    dy/dx+(cosx)y=2xy
    dy/dx=2xy-(cosx)y
    dy/dx=y(2x-cosx)
    (1/y)dy=(2x-cosx)dx
    ln (absolute y)+K=x^2-sinx+C
    e^(x^2-sinx+C)= absolute y

    2=e^(0+sin(0)+c) (-2 becomes 2 since it's absolute value)
    2=e^(c)
    c=ln(absolute value 2)
    So plugging it back in: ln(absolute y)=x^2-sinx+ln(absolute 2)
    e^(x^2-sinx+ln(absolute 2))=y. FINAL ANSWER. IS IT RIGHT?
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,504
    Thanks
    1400
    It's correct, but you can clean it up a lot more... ln|2| = ln(2) for example...

    Also remember that e^(a + b) = (e^a)(e^b), which means you should be able to simplify the e^ln(2) part...
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    Oct 2010
    Posts
    127
    wait. I've a question. If I plug in 0 for x. Then I would get e^(ln2), which is positive 2. But the given value of y is -2. What did I do wrong?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,504
    Thanks
    1400
    It's because you're getting back |y|, not y...
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    Oct 2010
    Posts
    127
    gotcha.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Find the particular solution of the differential equation
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: November 15th 2010, 01:29 AM
  2. Find a differential equation given solution
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: September 20th 2010, 11:15 PM
  3. To find a solution to this Differential Equation?
    Posted in the Differential Equations Forum
    Replies: 5
    Last Post: February 17th 2010, 01:43 PM
  4. Find the second solution of a differential equation
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: June 24th 2008, 08:10 AM
  5. Find the general solution for the differential equation
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: June 14th 2008, 04:00 AM

Search Tags


/mathhelpforum @mathhelpforum