Results 1 to 2 of 2

Math Help - Using Power Series to solve Non-Homog. DE

  1. #1
    Newbie
    Joined
    Oct 2009
    Posts
    22

    Using Power Series to solve Non-Homog. DE

    The equation is y''-4xy'-4y= e^x, assuming that y=(sigma from 0 to infinity) c_nx^n, a=0

    So I did the substitution and found the recurrence term to be
    c_n+2 = [(8nc_n)/(n+2)(n+1)]

    I just have to find the first six terms of the solution but how do I get the first two terms? (since when n=0 I get c_2)
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Aug 2008
    Posts
    903
    The first two are arbitrary and are due to the initial conditions so if y(0)=0 and y'(0)=1 then c0=0 and c1=1. Here's some Mathematica code to check the first 25 terms of the power series with those initial conditions against a numerically computed solution. It's a little messy. See if you can interpret it if you want. Note how I set c0 to 0 and c1 to 1 then created a table using your recurrence relation to compute the next 25 terms then used NDSolve to solve it numerically then superimposed the two plots. The agreement is not as good as I would expect.

    Code:
    Subscript[c, 0] = 0; 
    Subscript[c, 1] = 1; 
    myclist = Table[Subscript[c, n + 2] = 
        (8*n*Subscript[c, n])/((n + 2)*
          (n + 1)), {n, 0, 25}]
    myf[x_] := Sum[Subscript[c, n]*x^n, 
        {n, 0, 25}]; 
    p1 = Plot[myf[x], {x, 0, 1}]
    mysol = NDSolve[{Derivative[2][y][x] - 
           4*x*Derivative[1][y][x] - 
           4*y[x] == Exp[x], y[0] == 0, 
         Derivative[1][y][0] == 1}, y, 
        {x, 0, 1}]; 
    p2 = Plot[Evaluate[y[x] /. mysol], 
       {x, 0, 1}, PlotStyle -> Red]
    Show[{p1, p2}]
    Last edited by shawsend; March 24th 2010 at 04:30 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Solve by power series.
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: September 26th 2011, 08:15 PM
  2. Replies: 2
    Last Post: July 20th 2011, 02:41 PM
  3. Replies: 3
    Last Post: September 29th 2010, 07:11 AM
  4. Solve differential equation using "Power Series"
    Posted in the Differential Equations Forum
    Replies: 22
    Last Post: July 25th 2010, 08:47 AM
  5. Replies: 10
    Last Post: April 18th 2008, 11:35 PM

Search Tags


/mathhelpforum @mathhelpforum