Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Math Help - solving initial value problem!

  1. #1
    Newbie
    Joined
    Nov 2012
    From
    Canada
    Posts
    17

    solving initial value problem!

    I have

    xy' - 3y = x^4(e^x + cos x) - 2x^2 ; y(pi) = e^pi + (2/pi).

    Could someone solve this out for me?

    Thank you.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor MarkFL's Avatar
    Joined
    Dec 2011
    From
    St. Augustine, FL.
    Posts
    1,988
    Thanks
    734

    Re: solving initial value problem!

    I'm not going to post a full solution, but I will be glad to help you get one. Can you think of a way to write the ODE as a linear equation?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Mar 2010
    Posts
    980
    Thanks
    236

    Re: solving initial value problem!

    By linear, he means an equation of the form y'+p(x)y = q(x). But that's easy:

    y' - \frac{3}{x}y = x^3(e^x + \cos {x}) - 2x

    Now, how do you solve a first-order linear equation?

    - Hollywood
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Nov 2012
    From
    Canada
    Posts
    17

    Re: solving initial value problem!

    So i set p(x)= -3/x

    integrate p(x)dx = - integrate 3/x dx = - ln x^3

    then I did e^(-ln x^3) = 1/x^(3) which is the integrating factor... what do I do next??
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor MarkFL's Avatar
    Joined
    Dec 2011
    From
    St. Augustine, FL.
    Posts
    1,988
    Thanks
    734

    Re: solving initial value problem!

    Multiply the equation in standard linear form by this integrating factor. You should then find the left-hand side can be expressed as the derivative of a product.

    The equation in standard linear form:

    \frac{dy}{dx}-\frac{3}{x}y=x^3(e^x+\cos(x))-2x

    Now, multiply through by \mu(x)=\frac{1}{x^3}

    \frac{1}{x^3}\cdot\frac{dy}{dx}-\frac{3}{x^4}y=e^x+\cos(x)-\frac{2}{x^2}

    Rewrite the left side as the derivative of a product:

    \frac{d}{dx}\left(\frac{1}{x^3}\cdot y \right)=e^x+\cos(x)-\frac{2}{x^2}

    Now, integrate with respect to x.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Nov 2012
    From
    Canada
    Posts
    17

    Re: solving initial value problem!

    Hello, I have a question how did 1/x^3 x dy/dx - 3y/x^4 became d/dx(1/x^3 x y) ??
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor MarkFL's Avatar
    Joined
    Dec 2011
    From
    St. Augustine, FL.
    Posts
    1,988
    Thanks
    734

    Re: solving initial value problem!

    If the integrating factor is calculated correctly, you should always get the left side to be the derivative of the product of the integrating factor and the dependent variable.

    Observe that:

    \frac{d}{dx}\left(\frac{1}{x^3}\cdot y \right)=\frac{1}{x^3}\cdot\frac{dy}{dx}-\frac{3}{x^4}y

    Your textbook should give you a development of this method which will demonstrate why this always works.

    On a side note, I highly recommend that you do not use the character "x" to denote multiplication, as it can be confused with the variable x.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Nov 2012
    From
    Canada
    Posts
    17

    Re: solving initial value problem!

    I integrated the right side respect to x then i got

    y/x^3 = e^x + cos x - 2/x + c

    Then I multiplied x^3 to both side getting

    y= x^3 e^x + x^3 sin x + 2/x^2 + c/x^3

    Am I right so far? because I have this equation y(pi) = e^pi + (2/pi)

    But I tried and it does not seem to work
    Follow Math Help Forum on Facebook and Google+

  9. #9
    MHF Contributor MarkFL's Avatar
    Joined
    Dec 2011
    From
    St. Augustine, FL.
    Posts
    1,988
    Thanks
    734

    Re: solving initial value problem!

    You have integrated the trigonometric term on the right incorrectly (wait, I see you changed it in the second line), so not counting you first line, what you have done incorrectly is you have integrated the rational term incorrectly and divided the parameter (constant of integration) by x^3 rather than multiplied. So, what you should have is the general solution:

    y(x)=x^3\left(e^x+\sin(x)+\frac{2}{x}+c \right)

    Now, use the given initial condition to determine c.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Nov 2012
    From
    Canada
    Posts
    17

    Re: solving initial value problem!

    Deos the constant C becomes Cx^3? after multiplying?
    Follow Math Help Forum on Facebook and Google+

  11. #11
    MHF Contributor MarkFL's Avatar
    Joined
    Dec 2011
    From
    St. Augustine, FL.
    Posts
    1,988
    Thanks
    734

    Re: solving initial value problem!

    Yes, if you choose to distribute, then everything withing the parentheses gets a factor of x^3.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Newbie
    Joined
    Nov 2012
    From
    Canada
    Posts
    17

    Re: solving initial value problem!

    Hello so I got this equation

    e^pi + 2/pi = pi^3 e^pi + 2pi^2 +Cpi^3 from y(pi) = e^pi + 2/pi

    I tried moving everything to left leaving Cpi^3 on the right. But I find that the equation gets very messy? Is it supposed to be like that?
    Follow Math Help Forum on Facebook and Google+

  13. #13
    MHF Contributor MarkFL's Avatar
    Joined
    Dec 2011
    From
    St. Augustine, FL.
    Posts
    1,988
    Thanks
    734

    Re: solving initial value problem!

    Yes, the value I found for C is not a simple number. Post what you find for C and I will tell you if our results agree.
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Newbie
    Joined
    Nov 2012
    From
    Canada
    Posts
    17

    Re: solving initial value problem!

    I have got (pi e^pi - 2 - pi^4 e^pi - 2pi^3)/pi^4
    Follow Math Help Forum on Facebook and Google+

  15. #15
    MHF Contributor MarkFL's Avatar
    Joined
    Dec 2011
    From
    St. Augustine, FL.
    Posts
    1,988
    Thanks
    734

    Re: solving initial value problem!

    That is similar to what I have, not not the same. Could you post your derivation?
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. Solving differential equations with Initial condition
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: August 16th 2010, 12:14 PM
  2. Replies: 5
    Last Post: December 5th 2009, 02:52 PM
  3. Initial Value Problem
    Posted in the Calculus Forum
    Replies: 1
    Last Post: November 17th 2008, 04:50 PM
  4. half life solving initial quantity
    Posted in the Calculus Forum
    Replies: 7
    Last Post: March 23rd 2008, 07:10 PM
  5. initial value problem-HELP!!!!
    Posted in the Calculus Forum
    Replies: 1
    Last Post: January 21st 2008, 06:07 AM

Search Tags


/mathhelpforum @mathhelpforum