Preface
This is a tutorial made solely for the purpose of education and it was designed for students taking Applied Math 0330. It is primarily for students who have very little experience or have never used Mathematica before and would like to learn more of the basics for this computer algebra system. As a friendly reminder, don't forget to clear variables in use and/or the kernel.
Finally, the commands in this tutorial are all written in bold black font, while Mathematica output is in normal font. This means that you can copy and paste all commands into Mathematica, change the parameters and run them. You, as the user, are free to use the scripts for your needs to learn the Mathematica program, and have the right to distribute this tutorial and refer to this tutorial as long as this tutorial is accredited appropriately.
Return to computing page for the second course APMA0340
Return to Mathematica tutorial for the second course APMA0330
Return to Mathematica tutorial for the first course APMA0340
Return to the main page for the course APMA0340
Return to the main page for the course APMA0330
Return to Part IV of the course APMA0330
Differential Equations of higher order
Recall from calculus that derivatives of functions u(x) and y(t) are denoted as \( u'(x) \quad \mbox{or} \quad {\text d}u /{\text d}x \) and \( y' (t) = {\text d}y/ {\text d}t \quad \mbox{or} \quad \dot{y} , \) respectively. Newton's dot notation (\( \dot{y} \) ) is usually used to represent the derivative with respect to time. The notation x or t stands for the independent variable and will be widely used. Higher order derivatives have similar notation; for example, f'' or \( {\text d}^2 f/{\text d}x^2 \) denotes the second derivatives.
A second order differential equation in the normal form is as follows: \begin{equation} \label{E41.1} \frac{{\text d}^2 y}{{\text d} x^2} = F\left( x,y,\frac{{\text d}y}{{\text d}x} \right) \qquad \mbox{or} \qquad y'' = F\left( x,y,y' \right) , \end{equation} where F(x,y,p) is some given function of three variables. If the function F(x,y,p) is linear in variables y and p (that is, \( F(x,ay_1 + by_2 , p) = a\,F(x,y_1 , p) + b\,F(x, y_2 , p) \) for any constants a, b, and similar for variable p), then \( y'' = F\left( x,y, y' \right) \) is called linear.
For example, the equation \( y'' = \sin x + 3 y^2 + 2 \left( y' \right)^2 \) is a second order nonlinear differential equation, while the equation \( y'' = (\cos x)\,y \) is a linear one.
A function \( y=\phi (x) \) is a solution of \( y'' = F\left( x,y, y' \right) \) in some interval \( a < x < b \) (perhaps infinite), having derivatives up to the second order throughout the interval, if φ(x) satisfies the differential equation in the interval (a,b), that is,
For many of the differential equations to be considered, it will be found that solutions of \( y'' = F\left( x,y, y' \right) \) can be included in one formula, either explicit
Second order differential equations are widely used in science and engineering to model real world problems. The most famous second order differential equation is Newton's second law of motion, \( m\,\ddot{y} = F\left( t, y, \dot{y} \right) ,\) which describes a one-dimensional motion of a particle of mass m moving under the influence of a force F. In this equation, y=y(t) is the position of a particle at a time t, \( \dot{y} = {\text d}y/{\text d}t \) is its velocity, \( \ddot{y} = {\text d}^2 y/{\text d}t^2 \) is its acceleration, and F is the total force acting on the particle.
For given two numbers y0 and y1, we impose the initial conditions on y(x) in the form
Theorem: Suppose that F, \( \partial F/\partial y, \) and \( \partial F/\partial y' \) are continuous in a closed 3-dimensional domain Ω in xyy'-space, and the point \( (x_0 ,y_0 , y'_0 ) \) belongs to Ω. Then the initial value problem \( y'' = F\left( x,y, y' \right) , \quad y( x_0 )=y_0, \quad y' ( x_0 ) = y_1 \) has a unique solution \( y=\phi (x) \) on an x-interval in Ω containing x0. ■
The general linear differential equation of the second order is an equation that can be written asThe points where the coefficients of \( y'' (x) + p (x) \,y' (x) + q (x)\, y(x) = f(x) \) are discontinuous or undefined are called the singular points of the equation. These points are usually not used in the initial conditions except some cases. For example, the equation \( (x^2 -1)\,y'' + y=1 \) has two singular points x=1 and x=-1 that must be excluded. If in opposite, the initial condition \( y(1) =y_0 \) is imposed, then the differential equation dictates that \( y_0 =1 ; \) otherwise, it has no solution.
Theorem: Let p(x), q(x), and f(x) be continuous functions on an open interval \( a < x < b. \) Then, for each \( x_0 \in (a,b), \) the initial value problem
Equation \( y'' + p(x)y' + q(x) y =f(x) \) is a particular case of the general linear differential equation of the n-th order
Theorem: Let functions \( a_0 (x), a_1 (x), \ldots , a_n (x) \) and f(x) be defined and continuous on the closed interval \( a\leq x\leq b \) with \( a_n (x) \neq 0 \) for \( x\in [a,b] . \) Let x0 be such that \( a\leq x_0 \leq b \) and let y0, y'0, \( \ldots ,\ y^{(n-1)}_0 \) be any constant. Then in the closed interval [a,b], there exists a unique solution y(x) satisfying the initial value problem:
Example: Let us consider the initial value problem
Solution: To determine the validity interval (= the longest interval in which the given initial value problem is certain to have a unique twice-differentiable solution), we divide both sides of the differential equation by \( x(x^2 -4)=x(x-2)(x+2) \) to obtain \( y'' + p(x)y' + q(x)y =f(x) \) or
Return to Mathematica page
Return to the main page (APMA0330)
Return to the Part 1 (Plotting)
Return to the Part 2 (First Order ODEs)
Return to the Part 3 (Numerical Methods)
Return to the Part 4 (Second and Higher Order ODEs)
Return to the Part 5 (Series and Recurrences)
Return to the Part 6 (Laplace Transform)
Return to the Part 7 (Boundary Value Problems)