• Non polynomial example of the AnalyticalApproximations`LdeApprox` package

    Copyright © 2004-2017 DigiArea, Inc.

    All rights reserved.


    This notebook illustrates AnalyticalApproximations`LdeApprox` package capability of doing 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 RationalInterpolation function from NumericalMath`Approximations` package 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 NumericalMath`Approximations` 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 Mathematica™ function DSolve. Finally we compare exact and approximate results using Mathematica™ function Plot.

  • This loads the package.

  • [Graphics:Mathematica/LdeApprox/nonpoly/images/index_gr_1.gif]
  • This LDE has non-polynomial coefficient.

  • [Graphics:Mathematica/LdeApprox/nonpoly/images/index_gr_2.gif]
  • Trying to find approximate solution(an error occurs as the LDE has non polynomial coefficients).

  • [Graphics:Mathematica/LdeApprox/nonpoly/images/index_gr_4.gif]
  • Using ToRatCoeffs to convert the LDE into one with polynomial coefficients on the given interval.

  • [Graphics:Mathematica/LdeApprox/nonpoly/images/index_gr_7.gif]
  • Trying ApproxSol for the new LDE.

  • [Graphics:Mathematica/LdeApprox/nonpoly/images/index_gr_9.gif]
  • Using Mathematica™ function DSolve to get the exact solution.

  • [Graphics:Mathematica/LdeApprox/nonpoly/images/index_gr_11.gif]
  • Comparing the results.

  • [Graphics:Mathematica/LdeApprox/nonpoly/images/index_gr_13.gif]




    We use quite simple examples (just for Web). You can try more complex examples in your computer.