LDE with non polynomial coefficients Copyright © 2004-2008 DigiArea Group . All rights reserved. Description: This worksheet illustrates LdeApprox package capability of doing numerical polynomial approximation of an LDE solution with non polynomial coefficients. If the given LDE has non-polynomial coefficients one can use the package procedure ToRatCoeffs which gives a rational approximation of the coefficients. This procedure applies numapprox[minimax] procedure to each non-polynomial coefficient of the LDE. It should be pointed out that the coefficients can not involve indeterminate variables except independent one. This restriction comes from numapprox package as pure numerical one. First of all we load the package and define an IVP. Then we use ToRatCoeffs and ApproxSol procedures to find 9-th degree polynomial approximation for the IVP solution on interval x = [-1,1]. After that we find exact solution by Maple procedure dsolve . Finally we compare exact and approximate results using Maple procedure plot . This loads the package. restart: with(LdeApprox): Examples: This is a simple LDE with some non-polynomial coefficients. lde:=diff(y(x),x)+erf(x)*y(x)=0; 
Trying to find approximate solution of the IVP (an erroroccurs as the LDE has non polynomial coefficients). apr = ApproxSol({lde, y(0) = 1}, y(x), x=-1..1, 9);
Error, (in LdeApprox/ivp) erf(x) is not a polynomial on x
Using ToRatCoeffs to convert the LDE into approximate one with polynomial coefficients on the given interval. lde1 := ToRatCoeffs(lde, y(x), x=-1..1, 9); 
Trying ApproxSol for the new approximate LDE. apr := ApproxSol({lde1, y(0) = 1}, y(x), x=-1..1, 9); 
The exact solution of the IVP is as follows: sol:=dsolve({lde, y(0) = 1},y(x)); 
Comparing the results. plot(subs(sol,y(x))-subs(apr,y(x)),x=-1..1); ![[Maple Plot]](prod/LdeApproxMaple/examples/images/nonpoly11.gif)
Note We use quite simple example (just for Web). You can try more complex examples in your computer. |