Results 1 to 3 of 3

Math Help - first order differential equation

  1. #1
    Member
    Joined
    Jun 2008
    Posts
    175

    first order differential equation

    Solve the following equation

    x\frac{{dy}}{{dx}} - \frac{y}{{x + 1}} = x , y(1)=0, x>0

    Did the following to put in form y'+P(x)y=Q(x)

    <br />
\begin{array}{l}<br />
 \frac{{dy}}{{dx}} - \frac{y}{{x(x + 1)}} = x/x \\ <br />
 \frac{{dy}}{{dx}} - \frac{y}{{x(x + 1)}} = 1 \\ <br />
 \frac{{dy}}{{dx}} + y\left( {\frac{{ - 1}}{{x(x + 1)}}} \right) = 1 \\ <br />
 \end{array}<br />

    Than P(x) and the integrating factor are

    <br />
\begin{array}{l}<br />
 P(x) = \frac{{ - 1}}{{x^2  + x}} \\ <br />
 I = e^{\int {P(x)dx} }  = e^{\int {\frac{{ - 1}}{{x^2  + x}}} dx}  = e^{ - \int {\frac{1}{{x^2  + x}}} dx}  = e^{ - \int {\frac{1}{x} - \frac{1}{{x + 1}}} dx}  \\ <br />
 \end{array}<br />

    <br />
 = e^{ - \left[ {\int {\frac{1}{x}} dx - \int {\frac{1}{{x + 1}}dx} } \right]}  = e^{ - \left[ {\ln |x| - \ln |x + 1|} \right]}  = e^{\frac{{\ln |x + 1|}}{{\ln |x|}}}  = \frac{{x + 1}}{x}<br />


    Multiply by integrating factor and integrate RHS

    <br />
\begin{array}{l}<br />
 \frac{{dy}}{{dx}}(I) - \frac{y}{{x(x + 1)}}(I) = 1(I) \\ <br />
 \frac{{dy}}{{dx}}\left( {\frac{{x + 1}}{x}} \right) - \frac{y}{{x(x + 1)}}\left( {\frac{{x + 1}}{x}} \right) = 1\left( {\frac{{x + 1}}{x}} \right) \\ <br />
 \end{array}<br />

    <br />
\begin{array}{l}<br />
 \frac{d}{{dx}}\left( {\frac{{x + 1}}{x}y} \right) = 1\left( {\frac{{x + 1}}{x}} \right) \\ <br />
 \left( {\frac{{x + 1}}{x}y} \right) = \int {\left( {\frac{{x + 1}}{x}} \right)} dx \\ <br />
 \end{array}<br />

    <br />
 = \int {\left( {1 + \frac{1}{x}} \right)dx = \int {1dx + \int {\frac{1}{x}dx = x + \ln |x| + C} } } <br />

    <br />
\frac{{x + 1}}{x}y = x + \ln |x| + C<br />

    So give that when x=1 y = 0, solve for C

    <br />
\begin{array}{l}<br />
 y = \frac{x}{{x + 1}}\left( {x + \ln |x| + C} \right) \\ <br />
 0 = \frac{1}{{1 + 1}}\left( {1 + \ln (1) + C} \right) \\ <br />
 0 = \frac{1}{2} + C \\ <br />
 C =  - \frac{1}{2} \\ <br />
 \end{array}<br />

    and so initial value problem I worked out to be

    <br />
y = \frac{x}{{x + 1}}\left( {x - \frac{1}{2} + \ln x} \right)<br />

    However the answer to the problem is y = \frac{x}{{x + 1}}\left( {x - 1 + \ln x} \right) where they worked C= -1

    Can someone tell me here what I have done wrong? Or is the answer in the text wrong?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by Craka View Post
    Solve the following equation

    x\frac{{dy}}{{dx}} - \frac{y}{{x + 1}} = x , y(1)=0, x>0

    Did the following to put in form y'+P(x)y=Q(x)

    <br />
\begin{array}{l}<br />
\frac{{dy}}{{dx}} - \frac{y}{{x(x + 1)}} = x/x \\ <br />
\frac{{dy}}{{dx}} - \frac{y}{{x(x + 1)}} = 1 \\ <br />
\frac{{dy}}{{dx}} + y\left( {\frac{{ - 1}}{{x(x + 1)}}} \right) = 1 \\ <br />
\end{array}<br />

    Than P(x) and the integrating factor are

    <br />
\begin{array}{l}<br />
P(x) = \frac{{ - 1}}{{x^2 + x}} \\ <br />
I = e^{\int {P(x)dx} } = e^{\int {\frac{{ - 1}}{{x^2 + x}}} dx} = e^{ - \int {\frac{1}{{x^2 + x}}} dx} = e^{ - \int {\frac{1}{x} - \frac{1}{{x + 1}}} dx} \\ <br />
\end{array}<br />

    <br />
= e^{ - \left[ {\int {\frac{1}{x}} dx - \int {\frac{1}{{x + 1}}dx} } \right]} = e^{ - \left[ {\ln |x| - \ln |x + 1|} \right]} = e^{\frac{{\ln |x + 1|}}{{\ln |x|}}} = \frac{{x + 1}}{x}<br />


    Multiply by integrating factor and integrate RHS

    <br />
\begin{array}{l}<br />
\frac{{dy}}{{dx}}(I) - \frac{y}{{x(x + 1)}}(I) = 1(I) \\ <br />
\frac{{dy}}{{dx}}\left( {\frac{{x + 1}}{x}} \right) - \frac{y}{{x(x + 1)}}\left( {\frac{{x + 1}}{x}} \right) = 1\left( {\frac{{x + 1}}{x}} \right) \\ <br />
\end{array}<br />

    <br />
\begin{array}{l}<br />
\frac{d}{{dx}}\left( {\frac{{x + 1}}{x}y} \right) = 1\left( {\frac{{x + 1}}{x}} \right) \\ <br />
\left( {\frac{{x + 1}}{x}y} \right) = \int {\left( {\frac{{x + 1}}{x}} \right)} dx \\ <br />
\end{array}<br />

    <br />
= \int {\left( {1 + \frac{1}{x}} \right)dx = \int {1dx + \int {\frac{1}{x}dx = x + \ln |x| + C} } } <br />

    <br />
\frac{{x + 1}}{x}y = x + \ln |x| + C<br />

    So give that when x=1 y = 0, solve for C

    <br />
\begin{array}{l}<br />
y = \frac{x}{{x + 1}}\left( {x + \ln |x| + C} \right) \\ <br />
0 = \frac{1}{{1 + 1}}\left( {1 + \ln (1) + C} \right) \\ <br />
0 = \frac{1}{2} + C \\ <br />
C = - \frac{1}{2} \\ <br />
\end{array}<br />

    and so initial value problem I worked out to be

    <br />
y = \frac{x}{{x + 1}}\left( {x - \frac{1}{2} + \ln x} \right)<br />

    However the answer to the problem is y = \frac{x}{{x + 1}}\left( {x - 1 + \ln x} \right) where they worked C= -1

    Can someone tell me here what I have done wrong? Or is the answer in the text wrong?
    0 = \frac{1}{{1 + 1}}\left( {1 + \ln (1) + C} \right)

    \Rightarrow 0 = \frac{1}{2}\left( {1 + C} \right)

    \Rightarrow 0 = 1 + C \, ....
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Jun 2008
    Posts
    175
    stupid little mistake I make.

    Thanks Mr Fantastic
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: September 21st 2011, 04:37 PM
  2. 4th order differential equation??
    Posted in the Differential Equations Forum
    Replies: 3
    Last Post: April 22nd 2010, 10:08 PM
  3. First order differential equation
    Posted in the Differential Equations Forum
    Replies: 5
    Last Post: January 30th 2010, 01:41 PM
  4. First Order Differential Equation
    Posted in the Differential Equations Forum
    Replies: 3
    Last Post: October 16th 2009, 10:16 AM
  5. Replies: 2
    Last Post: November 25th 2008, 10:29 PM

Search Tags


/mathhelpforum @mathhelpforum