gfun[minimizediffeq] minimize differential equation given initial conditions
Calling Sequence
minimizediffeq(deq, y(z), options)
Parameters
deq - a set containing a linear differential equation with polynomial coefficients and initial conditions specifying a unique solution of it;
Description
- Given a linear differential equation together with initial conditions specifying a unique solution of it, the
minimizediffeqcommand finds the linear differential equation with polynomial coefficients of minimal order having this solution. If the option homogeneous is set to false, then it returns a non-homogeneous one of minimal order, if one exists, otherwise the minimal homogeneous equation is returned. - With
operator=name, the initial data is still used to identify the minimal equation, but the result is returned as a polynomial in the supplied name, or asL(name)=-qin the inhomogeneous case. - This is an analogue for differential equations of the command MinimalRecurrence of the package LREtools.
- This command is part of the
gfunpackage, so it can be used in the formminimizediffeq(..)only after executing the commandwith(gfun). However, it can always be accessed through the long form of the command by usinggfun[minimizediffeq](..).
Examples
> with(gfun):
> deq:={(20*z^6+12*z^5)*y(z)+(4*z^7+z^2+3*z-9)*diff(y(z),z)+(z^3-3*z^2)*diff(diff(y(z)
,z),z), y(0) = 1};
\[\{\left(20 z^{6}+12 z^{5}\right) y \! \left(z \right)+\left(4 z^{7}+z^{2}+3 z -9\right) \left(\frac{d}{d z}y \! \left(z \right)\right)+\left(z^{3}-3 z^{2}\right) \left(\frac{d^{2}}{d z^{2}}y \! \left(z \right)\right), y \! \left(0\right) = 1\}\]
> minimizediffeq(deq,y(z));
\[\{4 z^{5} y \! \left(z \right)+\left(z -3\right) \left(\frac{d}{d z}y \! \left(z \right)\right), y \! \left(0\right) = 1\}\]
> deq:={z^2*(1+z)*diff(diff(diff(y(z),z),z),z)-z*(2*z^2+2*z-1)*diff(diff(y(z),z),z)+(-
z^2-4*z-1)*diff(y(z),z), y(0) = 0, (D@@2)(y)(0) = 1/4};
\[\left\{z^{2} \left(1+z \right) \left(\frac{d^{3}}{d z^{3}}y \! \left(z \right)\right)-z \left(2 z^{2}+2 z -1\right) \left(\frac{d^{2}}{d z^{2}}y \! \left(z \right)\right)+\left(-z^{2}-4 z -1\right) \left(\frac{d}{d z}y \! \left(z \right)\right), y \! \left(0\right) = 0, D^{\left(2\right)}\! \left(y \right)\! \left(0\right) = {\frac{1}{4}}\right\}\]
> minimizediffeq(deq,y(z));
\[\left\{\left(-z^{2}-4 z -1\right) \left(\frac{d}{d z}y \! \left(z \right)\right)+\left(-2 z^{3}-2 z^{2}+z \right) \left(\frac{d^{2}}{d z^{2}}y \! \left(z \right)\right)+\left(z^{3}+z^{2}\right) \left(\frac{d^{3}}{d z^{3}}y \! \left(z \right)\right), y \! \left(0\right) = 0, D^{\left(2\right)}\! \left(y \right)\! \left(0\right) = {\frac{1}{4}}\right\}\]
So this equation is already minimal. However, the solution also satisfies a non-homogeneous equation of smaller order:
> minimizediffeq(deq,y(z),false);
\[\left\{\left(-z^{2}-4 z -1\right) \left(\frac{d}{d z}y \! \left(z \right)\right)+\left(-2 z^{3}-2 z^{2}+z \right) \left(\frac{d^{2}}{d z^{2}}y \! \left(z \right)\right)+\left(z^{3}+z^{2}\right) \left(\frac{d^{3}}{d z^{3}}y \! \left(z \right)\right), y \! \left(0\right) = 0, D^{\left(2\right)}\! \left(y \right)\! \left(0\right) = {\frac{1}{4}}\right\}\]