Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to Mathematica tutorial for the second course APMA0340
Return to the main page for the course APMA0330
Return to the main page for the course APMA0340
Return to Part IV of the course APMA0330
An exponential solution \( y = C\, e^{\lambda\,t} , \) where C ≠ 0 is an arbitrary real number and λ is a complex or real number, to the homogeneous constant coefficient
linear differential equation
is called a modal solution and \( C\, e^{\lambda\,t} \) is called a
mode of the system. If we assign to the left-hand side a linear differential operator
then the exponential function/mode is a solution to the homogeneous linear equation \( L\left[ \texttt{D} \right] y = 0 \) exactly when
λ is a root of the characteristic equation
If polynomial \eqref{EqComplex.3} has a simple complex root \( \lambda = \alpha + {\bf j} \beta , \)
then its complex conjugate \( \overline{\lambda} = \alpha - {\bf j} \beta \) also must be a root because
we consider only real-valued differential equations and all coefficients \( a_0 , a_1 , \cdots , a_n \)
are assumed to be real numbers. In this case, the characteristic polynomial can be factored:
Recall that L( λ ) is a real-valued polynomial of degree n
and M( λ ) is a real-valued polynomial of degree n-2. If
the characteristic polynomial has complex pair of roots \( \lambda = \alpha \pm {\bf j} \beta \)
of multiplicity m, then it can be factored:
we see that the characteristic equation \( a\,\lambda^2 + b\,\lambda + c =0 \) has two complex conjugate roots
\( \lambda = \alpha \pm {\bf j} \beta . \) So the differential equation
\( L\left[ \texttt{D} \right] y = 0 \) has two exponential solutions
Because the differential equation \( L\left[ \texttt{D} \right] y = 0 \) has real
coefficients, we are expecting real-valued solutions. This could be achieved only when one arbitrary constant
\( C_2 = \overline{C_1} \) is complex conjugate of another one. So upon introducing two
real arbitrary constants A and B such that \( 2\,C_1 = A + {\bf j} B , \quad
2\,C_2 = A - {\bf j} B , \) we get
that involve only real-valued functions. Here A and B are arbitrary real constants and the real number
β is referred to as pseudo-frequency.
Theorem: :
If \( z(t) \) is a complex-valued solution to
\[
L\left[ \texttt{D} \right] z = a_n \texttt{D}^n z + a_{n-1} \texttt{D}^{n-1} z + \cdots + a_1 \,\texttt{D} \,z+ a_0 \, z =0 ,
\qquad \texttt{D} = \frac{{\text d}}{{\text d}t} ,
\]
where all coefficients \( a_0 , a_1 , \ldots , a_n \) are real numbers, then the real
and imaginary parts of z are also solutions.
Example:
Consider second order differential equation
\[
y'' + a^2 y =0 , \qquad a>0.
\]
The corresponding characteristic equation, \( \lambda^2 + a^2 =0 \)
has two complex conjugate roots \( \lambda = \pm a{\bf j} , \) where j is the unit vector on the complex plane in positive vertical direction.
We use Mathematica to show that the fundamental set of solutions consists of sine and cosine functions.
In this syntax, you define cosine and sine functions by Cos[ ] and Sin[ ].
When you enter the general solution, you can verify that this is indeed the solution.
Example:
We verify that the function \( y(x) = C_1 \,\cos 2x + C_2 \,\sin 2x + x^3 -3x/2 \) is a solution of the differential equation
\( y'' + 4\,y = 4\,x^3 .\)
Upon adding this equation to the equation of motion with multiple j,
the unit vector in positive vertical direction on the complex plane ℂ, we
obtain
This formula represents the general solution of the equation of motion for the oscillator: the instantaneous position and velocity of the particle are equal to the real part and to ω0 times the imaginary part of the complex quantity z.
Taking the magnitude of both sides of complex quantity z, we have
is the phase of the complex quantity z0. Then we have
\[
x + {\bf j} \,\frac{v}{\omega_0} = A_0 e^{{\bf j} \left( \phi - \omega_0 t \right)} ,
\]
whose real part gives the position of the mass:
\[
x (t) = A_0 \cos \left( \phi - \omega_0 t \right) .
\]
▪
Example:
It is possible to extend the previously considered example for the case when damping term is
modeled by a linear expression proportional to the velocity:
\[
m\,\dot{v} = -k\,x - \gamma m\,v .
\]
Upon division by the trouble maker m, we get
\[
\frac{\text d}{{\text d}t}\, v = -\omega_0^2 x - \gamma\, v ,
\]
So far, we discussed differential equations with real coefficients. Now we turn to complex coefficient case that is also important. WE present this topic through examples.
Example:
Let us consider the initial value problem on semi-infinite interval (-∞,0):
What if some linear combination of the coefficients is zero, but both C[1] and C[2] are non-zero? Then you can't find the solution by testing simple cases. In this particular problem we are lucky: the correct boundary condition at infinity is C[2]==0 instead of Pi C[1]-4 C[2]== 0 or something.
We proceed without ComplexExpand
generalsol =
DSolve[{-2 I \[Pi]^2 w[z] + w''[z] == 0, w'[0] == (I a)}, w[z], z]
the output expression is not suitable for elimination of one of the arbitrary constants because the solution contains complex exponents. To make the coefficient clearer, we type
Function[z, ((1/2 + I/2) a E^((1 + I) \[Pi] z))/\[Pi]]
We check our answer with Mathematica:
{-2 I π^2 w[z] + w''[z] == 0, w[-∞] == 0,
w'[0] == 0 + (I a)} /. w -> sol // Simplify
{True, True, True}
▪
Gauthier, N., Novel approach for solving the equation of motion of a simple harmonic oscillator,
International Journal of Mathematical Education in Science and Technology, 2004, Vol. 35, No. 3, pp. 446--452. https://doi.org/10.1080/00207390410001686580
Kobayashi, Y., A geometrical key to solution of differential equation: d^{2}x(t)/ dt^{2} &eq; - ω² x(t)'', The Mathematical Gazette, 2003, Vol. 87, pp. 163--166.
Weinstock, R., Laws of Classical Motion: What's F? What's m? What's a?, American Journal of Physics, 1961, Vol. 29, Issue 10, pp. 698. https://doi.org/10.1119/1.1937555
Weinstock, R., An unusual method of solving the harmonic-oscillator equation,
American Journal of Physics, 1961, Vol. 29, Issue 12, pp. 830--831;
https://doi.org/10.1119/1.1937628
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)