Вы находитесь на странице: 1из 3

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/325256733

The role of the Runge - Kutta Method in approximating the solution of a


differential equation by means of a Chebyshev Polynomials

Article · May 2018

CITATIONS READS

0 487

1 author:

Alvaro H. Salas
National University of Colombia
211 PUBLICATIONS   939 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Lotka-Volterra Models View project

Nonlinear Equations-Solving Methods View project

All content following this page was uploaded by Alvaro H. Salas on 20 May 2018.

The user has requested enhancement of the downloaded file.


The role of the Runge - Kutta Method in
approximating the solution of a differential
equation by means of a Chebyshev
Polynomials.
By Alvaro H. Salas - Universidad Nacional de Colombia.

The purpose of this short note is to show the way we may obtain a
Chebyshev polynomial type approximant to adjust the solution of a given
differential equation. Let y (x) a ≤ x ≤ b be the numerical solution
of some ode with a given initial conditions. Let a = x 0 < x1 < ... < xn =
b somepartition of the interval [a, b]. We look for a polynomial P (x) of the form
n -a - b 2x n -a - b 2x
P (x) =  cj Tj - - =  cj cos j arcos - - ,
j=0 a - b a - b j=0 a - b a -b
i.e. P (x) is a linear combination of Chebyshev polynomials
of the first kind. We choose the coefficients c j so that
y (xi ) = P (xi ) for i = 0, 1, 2, ..., n.
This gives us a linear system in the unknowns c j :
n a + b - 2 xi
 cj cos j arcos = y (xi )
j=0 a-b
i = 0, 1, 2, ..., n.

Example. Let us consider the i.v.p.


y ''[x] + 0.5 y '[x] + y[x] + 2 y[x]2 + y[x]3 ⩵ 0.4 Cos[3 x], y[0] == 1 , y '[0] ⩵ 0.
Let n = 20;
a = 0;
b = 6;
b-a
h= ;
n
xi = a + i h i = 0, 1, 2, ..., n.

The following Mathematica code solves our problem :


2 Ringe-Kutta-Chebyshev approximant.nb

In[139]:= Clear[n, a, b, h, x, y, RungeKutta, P, system, coeffs, solution, approximant];


n = 20;
a = 0;
b = 6;
b-a
h= ;
n
x[i_] := a + i h;
RungeKutta[x_] := NDSolvey ''[ξ] + 0.5 y '[ξ] + y[ξ] + 2 y[ξ]2 + y[ξ]3 ⩵ 0.4 Cos[3 ξ],
y[0] == 1 , y '[0] ⩵ 0, y[ξ], {ξ, a, b}[[1, 1, 2]] //. ξ → x;
(*This defines the Runge-Kutta solution for the ode*)
n a+b-2x
P[x_] :=  cj ChebyshevTj, ;
j=0 a-b
system = Table[P[x[i]] == RungeKutta[x[i]], {i, 0, n}];
coeffs = Table[ci , {i, 0, n}];
solution = Flatten[NSolve[system, coeffs]];
approximant[x_] := P[x] //. solution1 // Expand
(*This gives the polynomial approximant for the solution*)
approximant[x]
Out[145]= 1. + 0.291755 x - 5.23252 x2 + 17.9138 x3 - 52.158 x4 + 106.678 x5 -
153.822 x6 + 162.702 x7 - 130.398 x8 + 80.9541 x9 - 39.4794 x10 + 15.2441 x11 -
4.67457 x12 + 1.13655 x13 - 0.217649 x14 + 0.0324082 x15 - 0.00367219 x16 +
0.00030572 x17 - 0.0000176193 x18 + 6.27598 × 10-7 x19 - 1.04033 × 10-8 x20

Now, we plot the Runge - Kutta solution and its polynomial approximant :

In[146]:= Plot[Evaluate[{RungeKutta[x], approximant[x]}],


{x, a, b}, PlotStyle → {RGBColor[1, 1, 0], {Dashed, Thick}}]
(*Runge-Kutta=red; approximant=dashed*)
1.0

0.5

1 2 3 4 5 6
Out[146]=
-0.5

-1.0

-1.5

Excellent ! Let us compare the two solutions numerically :


In[148]:= Table[{x, RungeKutta[x] - approximant[x]}, {x, a, b, 0.25}]
Out[148]= 0., 3.33067 × 10-16 , {0.25, - 0.00114126}, {0.5, 0.000286772}, {0.75, - 0.0000690976},
{1., 0.0000163747}, 1.25, - 3.21587 × 10-6 , 1.5, 3.33067 × 10-16 ,
1.75, 6.26174 × 10-7 , 2., - 5.93492 × 10-7 , 2.25, 4.23704 × 10-7 ,
2.5, - 2.54189 × 10-7 , 2.75, 1.12226 × 10-7 , 3., 4.44089 × 10-16 ,
3.25, - 8.54074 × 10-8 , 3.5, 1.4492 × 10-7 , 3.75, - 1.65948 × 10-7 , 4., 1.27823 × 10-7 ,
4.25, - 3.1756 × 10-8 , {4.5, 0.}, 4.75, - 7.59132 × 10-7 , 5., 5.77615 × 10-6 ,
{5.25, - 0.0000311689}, {5.5, 0.000152329}, {5.75, - 0.000677713}, 6., 1.11022 × 10 -16 

View publication stats

Вам также может понравиться