Results 1 to 4 of 4

Thread: Linear ODE question

  1. #1
    Senior Member
    Joined
    Apr 2010
    Posts
    487

    Linear ODE question

    The question:

    Solve the following Linear ODE:
    $\displaystyle x\frac{dy}{dx} + (1 + x)y = 2$

    My attempt:
    $\displaystyle x\frac{dy}{dx} + y + xy = 2$
    = $\displaystyle x(\frac{dy}{dx} + y) + y = 2$
    = $\displaystyle \frac{dy}{dx} + 2y = \frac{2}{x}$

    Integrating factor is:
    $\displaystyle e^{2x}$

    So we get:
    $\displaystyle e^{2x}y = 2\int{\frac{1}{x}e^{2x} \ dx}$

    Now at this point, Wolfram is giving me a weird solution to that integral. Have I made an error so far? I tried going further, but nothing resembles the answer at all. Any help would be great!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    12,880
    Thanks
    1946
    $\displaystyle \displaystyle x\,\frac{dy}{dx} + (1+x)\,y = 2$

    $\displaystyle \displaystyle \frac{dy}{dx} + \left(\frac{1+x}{x}\right)\,y = \frac{2}{x}$.


    So the integrating factor is $\displaystyle \displaystyle e^{\int{\frac{1+x}{x}\,dx}} = e^{\int{\frac{1}{x} + 1\,dx}} = e^{\ln{x} + x} = e^{\ln{x}}e^x = x\,e^x$.

    Multiplying through gives

    $\displaystyle \displaystyle x\,e^x\,\frac{dy}{dx} + x\,e^{x}\left(\frac{1+x}{x}\right)\,y = \frac{2x\,e^{x}}{x}$

    $\displaystyle \displaystyle x\,e^x\,\frac{dy}{dx} + e^x(1+x)\,y = 2e^x$

    $\displaystyle \displaystyle \frac{d}{dx}(x\,e^x\,y) = 2e^x$

    $\displaystyle \displaystyle x\,e^x\,y = \int{2e^x\,dx}$

    $\displaystyle \displaystyle x\,e^x\,y = 2e^x + C$

    $\displaystyle \displaystyle y = \frac{2e^x + C}{x\,e^x}$.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Joined
    Mar 2010
    From
    Florida
    Posts
    3,093
    Thanks
    10
    $\displaystyle \displaystyle y'+\frac{1+x}{x}y=2/x$

    $\displaystyle \displaystyle P(x)=\frac{1+x}{x} \ \ e^{\int P(x)dx}=e^{\int\frac{1+x}{x}dx}=e^{\ln{x}+x}=xe^x$

    $\displaystyle \displaystyle Q(x)=2/x$

    $\displaystyle \displaystyle \int\frac{dy}{dx}\left[e^{P(x)dx}y\right]=\int P(x)Q(x)dx$
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member
    Joined
    Apr 2010
    Posts
    487
    Whoops, silly algebra mistake.

    Thanks!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Linear Algebra: Linear Independence question
    Posted in the Advanced Algebra Forum
    Replies: 3
    Last Post: May 3rd 2011, 05:28 AM
  2. Linear Map Question
    Posted in the Advanced Algebra Forum
    Replies: 3
    Last Post: Jan 18th 2011, 01:40 AM
  3. linear law question
    Posted in the Algebra Forum
    Replies: 7
    Last Post: Jul 13th 2010, 03:00 AM
  4. Linear Algebra Question - Linear Operators
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: Mar 3rd 2009, 04:33 AM
  5. Linear map question
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: Mar 9th 2008, 04:29 PM

Search Tags


/mathhelpforum @mathhelpforum