Results 1 to 5 of 5

Math Help - Nonlinear ODE by an infinite series expansion

  1. #1
    Newbie
    Joined
    Sep 2009
    Posts
    2

    Nonlinear ODE by an infinite series expansion

    I have to solve the nonlinear DE y'=x-y by using an infinite series expansion y= \sum_{n=0}^{\infty} a_n x^n, but I've tried in vain. Maybe a change of variables would make it easier, but I don't know which one.

    Thanks
    Last edited by javicg; September 5th 2009 at 11:33 PM. Reason: simpler redaction
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Junior Member
    Joined
    Mar 2008
    Posts
    61
    Quote Originally Posted by javicg View Post
    I have to solve the nonlinear DE y'=x-y by using an infinite series expansion y= \sum_{n=0}^{\infty} a_n x^n, but I've tried in vain. Maybe a change of variables would make it easier, but I don't know which one.

    Thanks
    I suppose you are not really interested in this but if you want I can give you the analytical solution. I did not try answering your question so you can ignore the following if you want to. The solution involves the modified Bessel function of the first kind. It is not an easy equation but it is solvable. If you want just ask and I will post the solution.

    coomast
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Hi. I'm not sure about the applicability of power series to non-linear equations but I suspect if the equation is well-posed and the resulting expressions converge, then I would have hope the solution may be valid.

    So what' wrong with considering:

    y'+y^2=x^2;\quad y(0)=y_0

    and let:

    y(x)=\sum_{n=0}^{\infty} a_nx^n

    Now inserting this power series into the DE I would get:

    \sum_{n=0}^{\infty} n a_n x^{n-1}+\sum_{n=0}^{\infty}\sum_{k=0}^{n} a_k a_{n-k} x^n-x^2=0

    Adjusting the indexing so as to have the same powers on x:

    \sum_{n=0}^{\infty} n a_n x^{n-1}+\sum_{n=1}^{\infty}\left(\sum_{k=0}^{n-1} a_k a_{n-1-k}\right) x^{n-1}-x^2=0

    which gives me a possible solution with:

    a_0:\quad\text{arbitrary}

    n=1:\quad a_1=-a_0^2

    n=2:\quad a_2=-a_0 a_1

    n=3:\quad a_3=\frac{1}{3}\left(1-\sum_{k=0}^2 a_k a_{n-1-k}\right)

    n\geq 4:\quad a_n=-\frac{1}{n}\sum_{k=0}^{n-1} a_k a_{n-1-k}

    I may need to study further the sum which represents the coefficients for the power series though, and I could get some indication of the validity of my proposed solution above by actually coding it in Mathematica, (say for 100 terms) and then comparing a plot of the solution with the actual solution which Mathematica can compute exactly.
    Last edited by shawsend; September 7th 2009 at 01:00 PM. Reason: corrected formulas
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    Joined
    Aug 2008
    Posts
    903
    I would think another approach is to convert it to a second order linear DE via a Riccati substitution y=\frac{u'}{u}. Doing that I get:

    u''-x^2u=0

    Now that one is more amendable to power series and since it's second order, likely will involve two power series. Then we can differentiate and make the substitution above to get it in terms of y(x).
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member
    Joined
    Aug 2008
    Posts
    903
    You guys don't mind if I work on this right? I still left him some work to do and sides, he's probably done with it anyway.

    Starting with:

    y'+y^2-x^2=0,\quad y(0)=y_0

    I do the Riccati substitution and obtain:

    u''-x^2u=0,\quad y(x)=\frac{u'(x)}{u(x)}

    Letting u(x)=\sum_{n=0}^{\infty} a_n x^n

    I get:

    \sum_{n=0}^{\infty} n(n-1) x^{n-2}-\sum_{n=4}^{\infty} a_{n-4} x^{n-2}=0

    Now, after some work, I can express the solution in terms of two power series:

    u(x)=a_0\left[1+\sum_{k=1}^{\infty}\frac{x^{4k}}{\prod_{j=0}^{k-1} (3+4j)(4+4j)}\right]+a_1\left[x+\sum_{k=1}^{\infty}\frac{x^{4k+1}}{\prod_{j=0}^{  k-1} (4+4j)(5+4j)}\right]

    Not sure how that power series is related to the Bessel functions suggested by others and that reported by Mathematica however. Then:

    y(x)=\frac{u'(x)}{u(x)}

    At this point, I'm a little unclear about expressing the initial conditions in u from those in y. I assume all that's needed is the expression y(0)=\frac{u'(0)}{u(0)} and we can use any initial conditions in u to make that ratio true. But I'm not sure about that. So here goes: I considered the IVP:

    y'+y^2+x^2=0,\quad y(0)=2

    That means in term of u, I'd have 2=\frac{u'(0)}{u(0)}=\frac{2}{1}. I'm a little unclear on that however. I next coded this in mathematica: I first solved numerically:

    u''-x^2 u=0,\quad u(0)=1, u'(0)=2

    Then let a_0=1, a_1=2 in the series expression for u above. Plotted the first 25 terms and then superimposed the numerical results of u with the series results for u. The first plot shows excellent agreement. I next solved numerically:

    y'+y^2-x^2=0,\quad y(0)=2

    Then made the substitution y(x)=\frac{u'(x)}{u(x)} using the power series representation for u. I then superimposed the numerical plots of y with the power series plot of y. The second plot below again shows excellent agreement. This gives me some confidence that the power series is correct -you guys do realize all the secrets of the Universe can be found in non-linear equations right?

    Here's the Mathematica code if anyone is interested:

    Code:
    (* solve equation numerically in u *)
    
    sol = NDSolve[{Derivative[2][ua][x] - 
          x^2*ua[x] == 0, ua[0] == 1, 
        Derivative[1][ua][0] == 2}, ua, 
       {x, 0, 5}]
    p1 = Plot[ua[x] /. sol, {x, 0, 3}, 
       PlotStyle -> Blue]
    
    (* plot u as the power series *)
    
    kmax = 25; 
    a0 = 1; 
    a1 = 2; 
    ub[x_] := 
       a0*(1 + Sum[x^(4*k)/Product[
             (3 + 4*j)*(4 + 4*j), 
             {j, 0, k - 1}], {k, 1, kmax}]) + 
        a1*(x + Sum[x^(4*k + 1)/Product[
             (4 + 4*j)*(5 + 4*j), 
             {j, 0, k - 1}], {k, 1, kmax}]); 
    p2 = Plot[ub[x], {x, 0, 3}, 
       PlotStyle -> Red]
    netinu = Show[{p1, p2}]
    
    (* solve equation in y numerically *)
    
    sol2 = NDSolve[{Derivative[1][yb][x] + 
          yb[x]^2 - x^2 == 0, yb[0] == 2}, 
       yb, {x, 0, 3}]
    p3 = Plot[yb[x] /. sol2, {x, 0, 3}, 
       PlotStyle -> Blue]
    
    (* plot equation in y from power series in u *)
    
    ya[x_] = D[ub[x], x]/ub[x]; 
    p4 = Plot[ya[x], {x, 0, 3}, 
       PlotStyle -> Red]
    netiny = Show[{p4, p3}]
    Attached Thumbnails Attached Thumbnails Nonlinear ODE by an infinite series expansion-nonlinearplots2.jpg  
    Last edited by shawsend; September 8th 2009 at 02:11 PM. Reason: added Mathematica code
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Complex analysis, infinite series expansion of a function
    Posted in the Differential Geometry Forum
    Replies: 9
    Last Post: November 14th 2012, 12:08 PM
  2. infinite decimal expansion
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: May 16th 2010, 10:40 PM
  3. finite and infinite binary expansion of 3/16
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: February 5th 2010, 09:25 AM
  4. expansion of infinite series
    Posted in the Calculus Forum
    Replies: 1
    Last Post: February 26th 2009, 09:57 AM
  5. infinite product expansion
    Posted in the Advanced Algebra Forum
    Replies: 2
    Last Post: February 20th 2008, 04:20 AM

Search Tags


/mathhelpforum @mathhelpforum