| LdeApprox[ToRatCoeffs] - gives rational approximation of LDE coefficients over given interval Calling Sequence: ToRatCoeffs(lde, x = a..b, [m, n]) Parameters: lde - linear differential equation x - independent variable a, b - numerical values specifying the interval of approximation m - integer specifying the desired degree of the numerator n - integer specifying the desired degree of the denominator Description: - 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 is a restriction of numapprox package methods as pure numerical ones.
Examples: This loads the package. restart: with(LdeApprox): 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: . 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/help/images/ToRatCoeffs11.gif)
See Also: LdeApprox |