CHAPTER 4

image

Differential Equations Via Approximation Methods

Higher Order Equations and Approximation Methods

When the known algebraic methods for solving differential equations and systems of differential equations offer no solution, we usually resort to methods of approximation. The approximation methods can involve both symbolic and numerical work. The symbolic approach yields approximate algebraic solutions, and its most representative technique is the Taylor series method. The numerical approach yields a solution in the form of a finite set of solution points, to which a curve can be fitted by various algebraic methods (interpolation, regression,…). This curve will be an approximate solution of the differential equation. Among the most common numerical methods is the Runge–Kutta method.

Approximation methods are most commonly employed to find the solution of equations and systems of differential equations of order and degree greater than one, where the exact solution cannot be obtained by other methods.

The Taylor Series Method

This method provides approximate polynomial solutions of general differential equations, and is based on the Taylor series expansion of functions. MATLAB offers the option ‘series’ for the command maple(‘dsolve’), which allows you to solve equations by this method. Its syntax is as follows:

maple('dsolve(equation, func(var), 'series'))

There is also the command maple(‘powsolve’), which gives a power series solution of linear differential equations, and whose syntax is as follows:

maple('powseries [powsolve](equation, cond1,...,condn) ')

Using the command maple(‘convert(polynom)’) you can convert a complicated solution to a polynomial in powers of the variable.

EXERCISE 4-1

Solve the following two equations by the Taylor series method:

image

image

» pretty(simple(maple('dsolve(4 * x ^ 2 * diff(y(x), x$ 2) + 4 * x * diff(y(x), x) +(x ^ 2-1) * y(x) = 0 y(x), series)')))

                        2           4      6                    6
y(x) = (_C1 x(1 - 1/24 x  + 1/1920 x  + O(x )) + _C2 log(x)(O(x ))

                     2          4      6      /  1/2
     + _C2(1 - 1/8 x  + 1/384 x + O(x )))  /  x

» pretty(simplify(maple('convert(_C1 * x ^(1/2) *(1-1 / 24 * x ^ 2 + 1/1920 * x ^ 4 + O(x^6)) + _C2 *(1/x ^(1/2) * log(x) *(O(x^6)) + 1/x ^(1/2) *(1-1 / 8 * x ^ 2 + 1/384 * x ^ 4 + O(x^6))), polynom)')))

                                3           5                 6
        1/1920(1920 _C1 x - 80 x _C1 + _C1 x + 1920 _C1 x o(x))

                                  6                       2        4
             + 1920 _C2 log(x) o(x) + 1920 _C2 - 240 _C2 x + 5_C2 x

                           6      1/2
            (+1920 _C2 o(x)) / x

» pretty(maple('dsolve({y(x) * diff(y(x), x$ 2) + diff(y(x), x) ^ 2 + 1 = 0, y(0) = 1, D(y)(0) = 1}, y(x), series)'))

                                2    3        4        5      6
                y(x) = 1 + x - x  + x  - 3/2 x  + 5/2 x  + O(x )

EXERCISE 4-2

Solve the following two systems of equations using the Taylor series method:

image

and

image

» pretty(simple(maple('dsolve({diff(x(t), t$ 2) + diff(y(t), t) - 4 * x + 12 = 0, diff(y(t), t$ 2) - 10 * diff(x(t), t) y(t) + 7 = 0, x(0) = 1, y(0) = 1, D(0) = 1, D(x)(y)(0) = 1}, {x(t), y(t)}, series)')))

                   2                      3        4  387         5      6
{y(t) = 1 + t + 2 t  +(- 43/2 + 20/3 x) t  - 3/2 t  +(--- - 3 x) t  + O(t ),
                                                      40

                              2        3                   4         5     6
x(t) = 1 + t +(- 13/2 + 2 x) t  - 2/3 t  +(43/8 - 5/3 x) t  + 3/10 t  + O(t)}

» pretty(simple(maple('dsolve({diff(x(t),t$2)+2*diff(x(t),t)+2*diff(y(t),t)+ 3*diff(z(t),t)+x(t)=1,diff(y(t),t)+diff(z(t),t)-x(t)=0,diff(x(t),t)+z(t)=0}, {x(t),y(t),z(t)}, series)')))

                                                        2
{x(t) = x(0) + D(x)(0) t +(- D(x)(0) - 1/2 x(0) + 1/2) t
                                 3                                     4
+(1/2 D(x)(0) + 1/3 x(0) - 1/3) t  +(- 1/6 D(x)(0) - 1/8 x(0) + 1/8) t
                                           5      6
      +(1/24 D(x)(0) + 1/30 x(0) - 1/30) t  + O(t ),

                                    2                                     3
z(t) = z(0) + x(0) t + 1/2 D(x)(0) t  +(- 1/3 D(x)(0) - 1/6 x(0) + 1/6) t
                                             4
         +(1/8 D(x)(0) + 1/12 x(0) - 1/12) t
                                                5      6
         +(- 1/30 D(x)(0) - 1/40 x(0) + 1/40) t  + O(t ),

                                        2                                     3
    y(t) = y(0) + x(0) t + 1/2 D(x)(0) t  +(- 1/3 D(x)(0) - 1/6 x(0) + 1/6) t
                                             4
         +(1/8 D(x)(0) + 1/12 x(0) - 1/12) t
                                                5      6
         +(- 1/30 D(x)(0) - 1/40 x(0) + 1/40) t  + O(t )    }

}

The Runge–Kutta Method

The Runge–Kutta method gives a set of data points to which you can fit a curve, approximating the solution of a differential equation. Maple provides the option numeric for the command maple(‘solve’) which enables the calculation of approximate numerical solutions of differential equations. Its syntax is:

maple('dsolve(equation, func(var), 'numeric'))

EXERCISE 4-3

Solve the following equation using the Runge–Kutta method:

image

» maple('f: = dsolve({3 * diff(y(x), x$ 2) ^ 2 = diff(y(x), x$ 3) * diff(y(x), x), y(0) = 1/2, D(y)(0) = 1,(D@@2)(y)(0) = 1}, y(x), numeric)')

ans =

f := proc(x) `dsolve/numeric/result2`(x,3879004,[3]) end

Now, in order to graph the solution, we calculate various points of the solution function f generated above (see Figure 4-1).

» [maple('f(-0.3)'),maple('f(-0.2)'),maple('f(-0.1)'),maple('f(0)'),  maple('f(0.1)'), maple('f(0.2)'),maple('f(0.3)')]

ans =

{x = -.3,y(x) = .2350889359260396}{y(x) = .3167840433732281, x = -.2} {y(x) = .4045548849869109, x = -.1}{y(x) = .5000000000000000, x = 0} {x = .1, y(x) = .6055728090006967}{y(x) = .7254033307597474, x = .2} {y(x) = .8675444679682489, x = .3000000000000000}
» y = [.2350889359260396,.3167840433732281,.4045548849869109,.5,.6055728090006967,.7254033307597474,.8675444679682489];
» plot((-0.3:.1:0.3), y)

We find the degree 2 polynomial which is the best fit to the set of solution points. The equation of this parabola will be an approximate solution of the differential equation.

» pretty(vpa(poly2sym(polyfit((-0.3:.1:0.3),y,2))))

2
.5747427827483573 x + 1.041293962469090 x +.4991457846921903

This yields a degree 2 polynomial approximation to the solution y (x) of the equation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset