Author: Douglas Wilhelm Harder
This page shows how to find a solution to a higher-order initial-value problems (IVP).
Please review how to find a solution to a first-order initial-value problem (IVP) using Maple.
For a higher-order ODE, you require higher derivatives. Previously, we have seen that the Maple notation for the derivative of a function y(t) is D(y)(t). For higher derivatives, you must use composition. For the second derivative, there are three ways:
Notation | Explanation |
---|---|
D(D(y))(t) | The derivative of the derivative of y. |
(D@D)(y)(t) | The derivative composed with the derivative, forming the second derivative, of y. |
(D@@2)(y)(t) | The composition of the derivative with itself, forming the second derivative, of y. |
The second is equivalent to the composition of functions you learned in first year: $(f\circ g)(x) = f(g(x))$, only now, instead of applying functions to a real variable, we are applying the derivative to functions.
The later is equivalent to powering: $f^{\circ 1}(x) = f(x)$ and $f^{\circ 2}(x) = (f \circ f)(x)$ only now, it is $2$ derivatives that we are composing.
For higher derivatives, you could extend each of these notations, but to be honest, the cleanest is, for example, to represent the fifth derivative (D@@5)(y)(t) and not the more-difficult-to-read D(D(D(D(D))))(y)(t) or (D@D@D@D@D)(y)(t).
The notation (D@@n)(y)(t) parallels the notation $f^{\circ n}(x) = f^{\circ (n - 1)}(f(x))$ for $n > 1$, only now, it is $n$ derivatives that we are composing.
Suppose we have a second-order IVPs with ordinary differential equations (ODEs) and a initial conditions (ICs):
$y^{(2)}(t) - 2y^{(1)}(t) + y(t) = 0$
$y(0) = 1$
$y^{(1)}(0) = 2$
Just include the ODE and both ICs within a set and if you are using the graphical-user-interface for Maple, you can force a new line using Shift-Enter:
dsolve( { (D@@2)(y)(t) - 2*D(y)(t) + y(t) = 0, y(0) = 1, D(y)(0) = 2 }, y(t) );
$y(t) = e^t + t e^t$
Here are two fourth-order IVP borrowed from Oluwaseun Adeyeye and Zurni Omar's chapter in Proceedings of the Third International Conference on Computing, Mathematics and Statistics iCMS2017, pp.167-177:
dsolve( { (D@@4)(y)(t) = -(D@@2)(y)(t), y(0) = 0, D(y)(0) = -11/( 720 - 500*Pi), (D@@2)(y)(0) = 1/( 144 - 100*Pi), (D@@3)(y)(0) = 12/(1440 - 1000*Pi) }, y(t) );
$y(t) = -\frac{1}{4(-36 + 25\pi)} + \frac{t}{4(-36 + 25\pi)} + \frac{3\sin(t)}{10(-36 + 25\pi)} + \frac{\cos(t)}{4(-36 + 25\pi)}$
simplify( %, 'size' ); # Make the result as succict as possible
$y(t) = \frac{-5 + 5t + 6\sin(t) + 5\cos(t)}{-720 + 500\pi}$
dsolve( { (D@@4)(y)(t) = -t*y(t) - (8 + 7*t + t^3)*exp(t), y(0) = 0, D(y)(0) = 1, (D@@2)(y)(0) = 0, (D@@3)(y)(0) = -3 }, y(t) );
$y(t) = \frac{t(t - 1)\left(-e^t t^3 - 7e^t t - 8e^t\right)}{t^3 + 7t + 8}$
simplify( %, 'size' ); # Make the result as succict as possible
$y(t) = -e^t t(t - 1)$
dsolve( { (D@@4)(y)(t) = -t*y(t), y(0) = 0, D(y)(0) = 1, (D@@2)(y)(0) = 2, (D@@3)(y)(0) = 3 }, y(t) );
$y(t) = t\,\textrm{hypergeom}\left( [], \left[\frac{3}{5}, \frac{4}{5}, \frac{6}{5}\right], -\frac{t^5}{625}\right)$ $+ t^2 \textrm{hypergeom}\left( [], \left[\frac{4}{5}, \frac{6}{5}, \frac{7}{5}\right], -\frac{t^5}{625}\right)$ $+ \frac{t^3 \textrm{hypergeom}\left( [], \left[\frac{6}{5}, \frac{7}{5}, \frac{8}{5}\right], -\frac{t^5}{625}\right)}{2}$
# Differentiate the right-hand side of the above equation # four times and add to this 't' times the right-hand side # - This should equal 0 diff( rhs(%), t, t, t, t ) + t*rhs(%);
$\ldots \textit{something really long and ugly}\ldots$
simplify( % ); # Make the result as succict as possible
$0$
The output here has a function hypergeom(...). This is the generalized hypergeometric function, which describes a generalization of the power series you are familiar with in calculus. All the functions you are familiar with are special cases of such functions, so $e^x = \textrm{hypergeom}([], [], x)$, $\cos(x) = \textrm{hypergeom}\left([], \left[\frac{1}{2}\right], -\frac{x^2}{4}\right)$, and $\sin(x) = x\textrm{hypergeom}\left([], \left[\frac{3}{2}\right], -\frac{x^2}{4}\right)$. Such functions are solutions to specific ordinary differential equations, in the same way that $\sin(x)$ and $\cos(x)$ are solutions to the differential equation $y^{(2)}(x) + y(x) = 0$.