B.2: The Complex Exponential
 Page ID
 91835
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{\!\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\ #1 \}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\ #1 \}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{\!\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{\!\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
Definition and Basic Properties
There are two equivalent standard definitions of the exponential, \(e^z\text{,}\) of the complex number \(z=x+iy\text{.}\) For the more intuitive definition, one simply replaces the real number \(x\) in the Taylor series expansion^{ 1} \(e^x=\sum_{n=0}^\infty \frac{x^n}{n!}\) with the complex number \(z\text{,}\) giving
\[ e^z=\sum_{n=0}^\infty \frac{z^n}{n!} \tag{EZ} \nonumber \]
We instead highlight the more computationally useful definition.
For any complex number \(z=x+iy\text{,}\) with \(x\) and \(y\) real, the exponential \(\, e^z\, \text{,}\) is defined by
\[ e^{x+iy}\ =\ e^x\cos y+i e^x\sin y \nonumber \]
In particular^{ 2}, \(e^{iy}\ =\ \cos y+i \sin y\text{.}\)
We will not fully prove that the intuitive definition (EZ) and the computational Definition B.2.1 are equivalent. But we will do so in the special case that \(z=iy\text{,}\) with \(y\) real. Under (EZ),
\[ e^{iy} = 1 +iy +\frac{(iy)^2}{2!}+\frac{(iy)^3}{3!}+\frac{(iy)^4}{4!} +\frac{(iy)^5}{5!}+\frac{(iy)^6}{6!}+\cdots \nonumber \]
The even terms in this expansion are
\[ 1 +\frac{(iy)^2}{2!}+\frac{(iy)^4}{4!}+\frac{(iy)^6}{6!}+\cdots =1 \frac{y^2}{2!}+\frac{y^4}{4!}\frac{y^6}{6!}+\cdots =\cos y \nonumber \]
and the odd terms in this expansion are
\[ iy +\frac{(iy)^3}{3!}+\frac{(iy)^5}{5!}+\cdots =i\Big(y\frac{y^3}{3!}+\frac{y^5}{5!}+\cdots\Big) =i\sin y \nonumber \]
Adding the even and odd terms together gives us that, under (EZ), \(e^{iy}\) is indeed equal to \(\cos y + i\sin y\text{.}\)^{ 3 }It is obvious that, in the special case that \(z=x\) with \(x\) real, the definitions (EZ) and B.2.1 are equivalent. So to complete the proof of equivalence in the general case \(z=x+iy\text{,}\) it suffices to prove that \(e^{x+iy}=e^x e^{iy}\) under both (EZ) and Definition B.2.1. For Definition B.2.1, this follows from Lemma B.2.2, below. As a consequence, we have
\[ e^{i\pi}=1 \nonumber \]
which gives an amazing linking between calculus (\(e\)), geometry (\(\pi\)), algebra (\(i\)) and the basic number \(1\text{.}\)
In the next lemma we verify that the complex exponential obeys a couple of familiar computational properties.
 For any complex numbers \(z_1\) and \(z_2\text{,}\)
\[ e^{z_1+z_2} = e^{z_1}e^{z_2} \nonumber \]
 For any complex number \(c\text{,}\)
\[ \dfrac{d}{dt}e^{ct} = c e^{ct} \nonumber \]
 Proof

 For any two complex numbers \(z_1=x_1+iy_1\) and \(z_2=x_2+iy_2\text{,}\) with \(x_1\text{,}\) \(y_1\text{,}\) \(x_2\text{,}\) \(y_2\) real,
\begin{align*} &e^{z_1}e^{z_2} = e^{x_1}(\cos y_1+i \sin y_1)e^{x_2}(\cos y_2+i \sin y_2) \\ &= e^{x_1+x_2}(\cos y_1+i \sin y_1)(\cos y_2+i \sin y_2) \\ &= e^{x_1+x_2}\left\{(\cos y_1\cos y_2\!\!\sin y_1\sin y_2) +i (\cos y_1\sin y_2\!+\!\cos y_2\sin y_1)\right\} \\ &= e^{x_1+x_2}\left\{\cos(y_1+y_2)+i\sin(y_1+y_2)\right\} \end{align*}
by the trig identities of Appendix A.8. This says exactly that\[ e^{z_1}e^{z_2}= e^{(x_1+x_2)+i(y_1+y_2)} = e^{z_1+z_2} \nonumber \]
and that the familiar multiplication formula also applies to complex exponentials.  For any real number \(t\) and any complex number \(c=\alpha+i\beta\text{,}\) with \(\alpha\text{,}\) \(\beta\) real,
\[ e^{ct}=e^{\alpha t+i\beta t}=e^{\alpha t}[\cos( \beta t)+i\sin(\beta t)] \nonumber \]
so that the derivative with respect to \(t\)\begin{align*} \dfrac{d}{dt} e^{ct} &=\alpha e^{\alpha t}[\cos( \beta t)+i\sin(\beta t)] +e^{\alpha t}[\beta\sin( \beta t)+i\beta \cos(\beta t)] \\ &=(\alpha+i\beta) e^{\alpha t}[\cos( \beta t)+i\sin(\beta t)] \\ &=ce^{ct} \end{align*}
is also the familiar one.
 For any two complex numbers \(z_1=x_1+iy_1\) and \(z_2=x_2+iy_2\text{,}\) with \(x_1\text{,}\) \(y_1\text{,}\) \(x_2\text{,}\) \(y_2\) real,
Relationship with \(\sin\) and \(\cos\)
When \(\theta\) is a real number
\begin{align*} e^{i \theta} &= \cos \theta+i \sin \theta \\ e^{i \theta} &= \cos \thetai \sin \theta=\overline{e^{i\theta}} \end{align*}
are complex numbers of modulus one.
Solving for \(\cos\theta\) and \(\sin\theta\) (by adding and subtracting the two equations) gives
These formulae make it easy derive trig identities. For example,
\begin{align*} \cos\theta\cos\phi &= \frac{1}{4}\big(e^{i\theta}+e^{i\theta}\big) \big(e^{i\phi}+e^{i\phi}\big) \\ &= \frac{1}{4}\big(e^{i(\theta+\phi)}+e^{i(\theta\phi)} +e^{i(\theta+\phi)}+e^{i(\theta+\phi)}\big) \\ &= \frac{1}{4}\big(e^{i(\theta+\phi)}+e^{i(\theta+\phi)} +e^{i(\theta\phi)} +e^{i(\theta+\phi)}\big) \\ &= \frac{1}{2}\big(\cos(\theta+\phi)+\cos(\theta\phi)\big) \end{align*}
and, using \((a+b)^3=a^3+3a^2b+3ab^2+b^3\text{,}\)
\begin{align*} \sin^3\theta&=\frac{1}{8i}\big(e^{i\theta}e^{i\theta}\big)^3\cr &=\frac{1}{8i}\big(e^{i3\theta}3e^{i\theta} +3e^{i\theta}e^{i3\theta}\big) \\ &=\frac{3}{4}\frac{1}{2i}\big(e^{i\theta}e^{i\theta}\big) \frac{1}{4}\frac{1}{2i}\big(e^{i3\theta}e^{i3\theta}\big) \\ &=\frac{3}{4}\sin\theta\frac{1}{4}\sin(3\theta) \end{align*}
and
\begin{align*} \cos(2\theta)&=\Re\big(e^{2\theta i}\big)=\Re \big(e^{i\theta}\big)^2 \\ &=\Re \big(\cos \theta+i\sin\theta\big)^2 \\ &=\Re \big(\cos^2 \theta+2i\sin\theta\cos\theta\sin^2\theta\big) \\ &=\cos^2\theta\sin^2\theta \end{align*}
Polar Coordinates
Let \(z=x+iy\) be any complex number. Writing \(x\) and \(y\) in polar coordinates in the usual way, i.e. \(x=r\cos(\theta)\text{,}\) \(y=r\sin(\theta)\text{,}\) gives
\begin{gather*} x+iy=r\cos\theta+ir\sin\theta=re^{i\theta}\qquad \end{gather*}
See the figure on the left below. In particular
\begin{alignat*}{4} 1 &=\ \ \ \ e^{i0} &&= e^{2\pi i} &&= e^{2k\pi i} &&\quad\text{for }k=0,\pm 1,\pm2,\cdots \\ 1 &=\ \ \ e^{i\pi} &&= e^{3\pi i} &&= e^{(1+2k)\pi i} &&\quad\text{for }k=0,\pm 1,\pm2,\cdots \\ i &=\ e^{i\pi/2} &&= e^{{5\over 2}\pi i} &&= e^{({1\over 2}+2k)\pi i} &&\quad\text{for }k=0,\pm 1,\pm2,\cdots \\ i &= e^{i\pi/2} &&=e^{{3\over 2}\pi i} &&= e^{({1\over 2}+2k)\pi i} &&\quad\text{for }k=0,\pm 1,\pm2,\cdots \end{alignat*}
See the figure on the right below.
The polar coordinate \(\theta=\arctan\frac{y}{x}\) associated with the complex number \(z=x+iy\text{,}\) i.e. the point \((x,y)\) in the \(xy\)plane, is also called the argument of \(z\text{.}\)
The polar coordinate representation makes it easy to find square roots, third roots and so on. Fix any positive integer \(n\text{.}\) The \(n^{\rm th}\) roots of unity are, by definition, all solutions \(z\) of
\[ z^n\ =\ 1 \nonumber \]
Writing \(z=re^{i\theta}\)
\[ r^ne^{n\theta i}\ =\ 1e^{0i} \nonumber \]
The polar coordinates \((r,\theta)\) and \((r',\theta')\) represent the same point in the \(xy\)plane if and only if \(r=r'\) and \(\theta=\theta'+2k\pi\) for some integer \(k\text{.}\) So \(z^n=1\) if and only if \(r^n=1\text{,}\) i.e. \(r=1\text{,}\) and \(n\theta =2 k\pi\) for some integer \(k\text{.}\) The \(n^{\rm th}\) roots of unity are all the complex numbers \(e^{2\pi i{k\over n}}\) with \(k\) integer. There are precisely \(n\) distinct \(n^{\rm th}\) roots of unity because \(e^{2\pi i{k\over n}}=e^{2\pi i{k'\over n}}\) if and only if \(2\pi {k\over n}2\pi {k'\over n}=2\pi {kk'\over n}\) is an integer multiple of \(2\pi\text{.}\) That is, if and only if \(kk'\) is an integer multiple of \(n\text{.}\) The \(\, n\, \) distinct \(n^{\rm th}\) roots of unity are
\[ 1\ ,\ e^{2\pi i{1\over n}}\ ,\ e^{2\pi i{2\over n}} \ ,\ e^{2\pi i{3\over n}}\ ,\ \cdots\ ,\ e^{2\pi i{n1\over n}} \nonumber \]
For example, the \(6^{\rm th}\) roots of unity are depicted below.
Exploiting Complex Exponentials in Calculus Computations
You have learned how to evaluate integrals involving trigonometric functions by using integration by parts, various trigonometric identities and various substitutions. It is often much easier to just use (B.2.3) and (B.2.4). Part of the utility of complex numbers comes from how well they interact with calculus through the exponential function. Here are two examples.
\[\begin{align*} \int e^x\cos x\ \, d{x}&=\frac{1}{2} \int e^x\big[e^{ix}+e^{ix}\big]\ \, d{x} =\frac{1}{2} \int \big[e^{(1+i)x}+e^{(1i)x}\big]\ \, d{x} \\ &=\frac{1}{2} \left[\frac{1}{1+i}e^{(1+i)x}+\frac{1}{1i}e^{(1i)x}\right]+C \end{align*}\]
This form of the indefinite integral looks a little weird because of the \(i\)'s. While it looks complex because of the \(i\)'s, it is actually purely real (and correct), because \(\frac{1}{1i}e^{(1i)x}\) is the complex conjugate of \(\frac{1}{1+i}e^{(1+i)x}\text{.}\) We can convert the indefinite integral into a more familiar form just by subbing back in \(e^{\pm ix}=\cos x\pm i\sin x\text{,}\) \(\frac{1}{1+i}=\frac{1i}{(1+i)(1i)}=\frac{1i}{2}\) and \(\frac{1}{1i}=\overline{\frac{1}{1+i}}=\frac{1+i}{2}\text{.}\)
\begin{align*} \int e^x\cos x\ \, d{x} &=\frac{1}{2} e^x\left[\frac{1}{1+i}e^{ix}+\frac{1}{1i}e^{ix}\right]+C\\ &=\frac{1}{2} e^x\left[\frac{1i}{2}(\cos x+i\sin x) +\frac{1+i}{2}(\cos xi\sin x)\right]+C \\ &=\frac{1}{2} e^x\cos x+\frac{1}{2} e^x\sin x+C \end{align*}
You can quickly verify this by differentiating (or by comparing with Example 1.7.11).
Evaluating the integral \(\int\cos^nx\ \, d{x}\) using the methods of Section 1.8 can be a real pain. It is much easier if we convert to complex exponentials. Using \((a+b)^4=a^4+4a^3b+6a^2b^2+4ab^3+b^4\text{,}\)
\begin{align*} \int \cos^4 x\ \, d{x}&=\frac{1}{2^4} \int\big[e^{ix}+e^{ix}\big]^4\ \, d{x}\\ &=\frac{1}{2^4} \int \big[e^{4ix}+4e^{2ix}+6+4e^{2ix}+e^{4ix}\big]\ \, d{x} \\ &=\frac{1}{2^4} \left[\frac{1}{4i}e^{4ix}+\frac{4}{2i}e^{2ix}+6x +\frac{4}{2i}e^{2ix}+\frac{1}{4i}e^{4ix}\right]+C\\ &=\frac{1}{2^4} \left[\frac{1}{2}\frac{1}{2i}(e^{4ix}e^{4ix}) +\frac{4}{2i}(e^{2ix}e^{2ix})+6x\right]+C\\ &=\frac{1}{2^4} \left[\frac{1}{2}\sin 4x+4\sin 2x+6x\right]+C \\ &=\frac{1}{32} \sin 4x+\frac{1}{4}\sin 2x+\frac{3}{8}x+C \end{align*}
Exploiting Complex Exponentials in Differential Equation Computations
Complex exponentials are also widely used to simplify the process of guessing solutions to ordinary differential equations. We'll start with (possibly a review of) some basic definitions and facts about differential equations.
 A differential equation is an equation for an unknown function that contains the derivatives of that unknown function. For example \(y''(t)+y(t)=0\) is a differential equation for the unknown function \(y(t)\text{.}\)
 In the differential calculus text CLP1, we treated only derivatives of functions of one variable. Such derivatives are called ordinary derivatives. A differential equation is called an ordinary differential equation (often shortened to “ODE”) if only ordinary derivatives appear. That is, if the unknown function has only a single independent variable.
In CLP3 we will treat derivatives of functions of more than one variable. For example, let \(f(x,y)\) be a function of two variables. If you treat \(y\) as a constant and take the derivative of the resulting function of the single variable \(x\text{,}\) the result is called the partial derivative of \(f\) with respect to \(x\text{.}\) A differential equation is called a partial differential equation (often shortened to “PDE”) if partial derivatives appear. That is, if the unknown function has more than one independent variable. For example \(y''(t)+y(t)=0\) is an ODE while \(\frac{\partial^2 u}{\partial\, t^2}(x,t)=c^2 \frac{\partial^2 u}{\partial\, x^2}(x,t)\) is a PDE.
 The order of a differential equation is the order of the highest derivative that appears. For example \(y''(t)+y(t)=0\) is a second order ODE.
 An ordinary differential equation that is of the form
\[ a_0(t) y^{(n)}(t) + a_1(t) y^{(n1)}(t)+\cdots +a_n(t)y(t) =F(t)\label{eqn_ODEordern}\tag{B.2.1} \]
with given coefficient functions \(a_0(t)\text{,}\) \(\cdots\text{,}\) \(a_n(t)\) and \(F(t)\) is said to be linear. Otherwise, the ODE is said to be nonlinear. For example, \(y'(t)^2+y(t)=0\text{,}\) \(y'(t)y''(t)+y(t)=0\) and \(y'(t)=e^{y(t)}\) are all nonlinear.
 The ODE (B.2.1) is said to have constant coefficients if the coefficients \(a_0(t)\text{,}\) \(a_1(t)\text{,}\) \(\cdots\text{,}\) \(a_n(t)\) are all constants. Otherwise, it is said to have variable coefficients. For example, the ODE \(y''(t)+7y(t)=\sin t\) is constant coefficient, while \(y''(t)+ty(t)=\sin t\) is variable coefficient.
 The ODE (B.2.1) is said to be homogeneous if \(F(t)\) is identically zero. Otherwise, it is said to be inhomogeneous or nonhomogeneous. For example, the ODE \(y''(t)+7y(t)=0\) is homogeneous, while \(y''(t)+7y(t)=\sin t\) is inhomogeneous. A homogeneous ODE always has the trivial solution \(y(t)=0\text{.}\)
 An initial value problem is a problem in which one is to find an unknown function \(y(t)\) that satisfies both a given ODE and given initial conditions, like \(y(t_0)=1\text{,}\) \(y'(t_0)=0\text{.}\) Note that all of the conditions involve the function \(y(t)\) (or its derivatives) evaluated at a single time \(t=t_0\text{.}\)
 A boundary value problem is a problem in which one is to find an unknown function \(y(t)\) that satisfies both a given ODE and given boundary conditions, like \(y(t_0)=0\text{,}\) \(y(t_1)=0\text{.}\) Note that the conditions involve the function \(y(t)\) (or its derivatives) evaluated at two different times.
The following theorem gives the form of solutions to the linear^{ 4} ODE (B.2.1).
Assume that the coefficients \(a_0(t)\text{,}\) \(a_1(t)\text{,}\) \(\cdots\text{,}\) \(a_{n1}(t)\text{,}\) \(a_n(t)\) and \(F(t)\) are continuous functions and that \(a_0(t)\) is not zero.
 The general solution to the linear ODE (B.2.1) is of the form
\[ y(t)=y_p(t)+ C_1y_1(t)+C_2y_2(t)+\cdots+C_n y_n(t)\label{eqn_ODEgensln}\tag{B.2.2} \]
where
 \(n\) is the order of (B.2.1)
 \(y_p(t)\) is any solution to (B.2.1)
 \(C_1\text{,}\) \(C_2\text{,}\) \(\cdots\text{,}\) \(C_n\) are arbitrary constants
 \(y_1\text{,}\) \(y_2\text{,}\) \(\cdots\text{,}\) \(y_n\) are \(n\) independent solutions to the homogenous equation
\[ a_0(t) y^{(n)}(t) + a_1(t) y^{(n1)}(t)+\cdots+a_{n1}(t) y'(t) +a_n(t)y(t)=0 \nonumber \]
associated to (B.2.1). “Independent” just means that no \(y_i\) can be written as a linear combination of the other \(y_j\)'s. For example, \(y_1(t)\) cannot be expressed in the form \(b_2y_2(t)+\cdots+b_ny_n(t)\text{.}\)
In (B.2.2), \(y_p\) is called the “particular solution” and \(C_1y_1(t)+C_2y_2(t)+\cdots+C_n y_n(t)\) is called the “complementary solution”.
 Given any constants \(b_0\text{,}\) \(\cdots\text{,}\) \(b_{n1}\) there is exactly one function \(y(t)\) that obeys the ODE (B.2.1) and the initial conditions
\[ y(0)=b_0\qquad y'(0)=b_1\qquad \cdots\qquad y^{(n1)}(0)=b_{n1} \nonumber \]
In the following example we'll derive one widely used linear constant coefficient ODE.
As an example of how ODE's arise, we consider the RLC circuit, which is the electrical circuit consisting of a resistor of resistance \(R\text{,}\) a coil (or solenoid) of inductance \(L\text{,}\) a capacitor of capacitance \(C\) and a voltage source arranged in series, as shown below. Here \(R\text{,}\) \(L\) and \(C\) are all nonnegative constants.
We're going to think of the voltage \(x(t)\) as an input signal, and the voltage \(y(t)\) as an output signal. The goal is to determine the output signal produced by a given input signal. If \(i(t)\) is the current flowing at time \(t\) in the loop as shown and \(q(t)\) is the charge on the capacitor, then the voltages across \(R\text{,}\) \(L\) and \(C\text{,}\) respectively, at time \(t\) are \(Ri(t)\text{,}\) \(L\dfrac{di}{dt}(t)\) and \(y(t)=\frac{q(t)}{C}\text{.}\) By the Kirchhoff's law^{ 5} that says that the voltage between any two points has to be independent of the path used to travel between the two points, these three voltages must add up to \(x(t)\) so that
\[ Ri(t) + L\dfrac{di}{dt}(t) + \frac{q(t)}{C} = x(t)\label{eqn_RLCrlc}\tag{B.2.3} \]
Assuming that \(R,\ L,\ C\) and \(x(t)\) are known, this is still one differential equation in two unknowns, the current \(i(t)\) and the charge \(q(t)\text{.}\) Fortunately, there is a relationship between the two. Because the current entering the capacitor is the rate of change of the charge on the capacitor
\[ i(t)=\dfrac{dq}{dt}(t) = Cy'(t)\label{eqn_RLCiq}\tag{B.2.4} \]
This just says that the capacitor cannot create or destroy charge on its own; all charging of the capacitor must come from the current. Substituting (B.2.4) into (B.2.3) gives
\[ LCy''(t) + RCy'(t) + y(t) = x(t) \nonumber \]
which is a second order linear constant coefficient ODE. As a concrete example, we'll take an ac voltage source and choose the origin of time so that \(x(0)=0\text{,}\) \(x(t)=E_0\sin(\omega t)\text{.}\) Then the differential equation becomes
\[ LCy''(t)+RCy'(t)+y(t)=E_0\sin(\omega t)\label{eqn_ODERy}\tag{B.2.5} \]
Finally, here are two examples in which we use complex exponentials to solve an ODE.
By Theorem B.2.9(a), the general solution to the ordinary differential equation
\[ y''(t)+4y'(t)+5y(t)=0 \tag{ODE} \nonumber \]
is of the form \(C_1 u_1(t)+C_2 u_2(t)\) with \(u_1(t)\) and \(u_2(t)\) being two (independent) solutions to (ODE) and with \(C_1\) and \(C_2\) being arbitrary constants. The easiest way to find \(u_1(t)\) and \(u_2(t)\) is to guess them. And the easiest way to guess them is to try^{ 6 }The reason that \(y(t)=e^{rt}\) is a good guess is that, with this guess, all of \(y(t)\text{,}\) \(y'(t)\) and \(y''(t)\) are constants times \(e^{rt}\text{.}\) So the left hand side of the differential equation is also a constant, that depends on \(r\text{,}\) times \(e^{rt}\text{.}\) So we just have to choose \(r\) so that the constant is zero. \(y(t)=e^{rt}\text{,}\) with \(r\) being a constant to be determined. Substituting \(y(t)=e^{rt}\) into (ODE) gives
\begin{gather*} r^2 e^{rt} +4re^{rt}+5e^{rt}=0 \iff\big(r^2 +4r+5\big)e^{rt}=0 \iff r^2 +4r+5=0 \end{gather*}
This quadratic equation for \(r\) can be solved either by using the high school formula or by completing the square.
\begin{align*} r^2 +4r+5=0 &\iff (r+2)^2+1=0\\ &\iff (r+2)^2=1 \iff r+2=\pm i \\ &\iff r=2\pm i \end{align*}
So the general solution to (ODE) is
\begin{gather*} y(t)=C_1e^{(2+i)t} + C_2e^{(2i)t} \end{gather*}
This is one way to write the general solution, but there are many others. In particular there are quite a few people in the world who are (foolishly) afraid^{ 7 }Embracing the complexity leads to simplicity. of complex exponentials. We can hide them by using (B.2.3) and (B.2.4).
\begin{align*} y(t)&=C_1e^{(2+i)t} + C_2e^{(2i)t} =C_1e^{2t}e^{it} + C_2 e^{2t}e^{it} \\ &=C_1e^{2t}\big(\cos t+i\sin t \big) +C_2 e^{2t}\big(\cos ti\sin t \big) \\ &=(C_1+C_2) e^{2t} \cos t +(iC_1iC_2) e^{2t}\sin t \\ &=D_1 e^{2t} \cos t +D_2 e^{2t}\sin t \end{align*}
with \(D_1=C_1+C_2\) and \(D_2=iC_1iC_2\) being two other arbitrary constants. Don't make the mistake of thinking that \(D_2\) must be complex because \(i\) appears in the formula \(D_2=iC_1iC_2\) relating \(D_2\) and \(C_1,C_2\text{.}\) No one said that \(C_1\) and \(C_2\) are real numbers. In fact, in typical applications, the arbitrary constants are determined by initial conditions and often \(D_1\) and \(D_2\) turn out to be real and \(C_1\) and \(C_2\) turn out to be complex. For example, the initial conditions \(y(0)=0\text{,}\) \(y'(0)=2\) force
\begin{align*} 0&=y(0) = C_1 + C_2 \cr 2&=y'(0) = (2+i)C_1 + (2i)C_2 \end{align*}
The first equation gives \(C_2=C_1\) and then the second equation gives
\begin{align*} (2+i)C_1  (2i)C_1 = 2 &\iff 2iC_1=2 \iff iC_1=1\\ &\iff C_1=i,\ C_2=i \end{align*}
and
\begin{gather*} D_1=C_1+C_2=0\qquad D_2=iC_1iC_2=2 \end{gather*}
We shall now guess one solution (i.e. a particular solution) to the differential equation
\[ y''(t)+2y'(t)+3y(t)=\cos t \tag{ODE1} \nonumber \]
Equations like this arise, for example, in the study of the RLC circuit. We shall simplify the computation by exploiting that \(\cos t=\Re e^{it}\text{.}\) First, we shall guess a function \(Y(t)\) obeying
\[ Y''+2Y'+3Y=e^{i t} \tag{ODE2} \nonumber \]
Then, taking complex conjugates gives
\[ \bar Y''+2\bar Y'+3\bar Y=e^{i t} \nonumber \]
which we shall call (\(\overline{\text{ODE2}}\)). Then, adding \(\frac{1}{2}\)(ODE2) and \(\frac{1}{2}\)(\(\overline{\text{ODE2}}\)) together will give
\[ (\Re Y)''+2(\Re Y)'+3(\Re Y)=\Re e^{i t}=\cos t \nonumber \]
which shows that \(\Re Y(t)\) is a solution to (ODE1). Let's try \(Y(t)=Ae^{i t}\text{,}\) with \(A\) a constant to be determined. This is a solution of (ODE2) if and only if
\begin{align*} & & \frac{\mathrm{d^2}}{\mathrm{d}t^2}\big(Ae^{it}\big) +2\dfrac{d}{dt}\big(Ae^{it}\big) +3Ae^{it}&=e^{it} \\ &\iff& (i^2+2i+3)Ae^{it}&=e^{it} \\ &\iff& A&=\frac{1}{2+2i} \end{align*}
So \(\frac{e^{it}}{2+2i}\) is a solution to (ODE2) and \(\Re \frac{e^{it}}{2+2i}\) is a solution to (ODE1). To simplify this, write \(2+2i\) in polar coordinates. From the sketch below we have \(2+2i=2\sqrt{2}e^{i{\pi\over 4}}\text{.}\)
So
\begin{align*} \frac{e^{it}}{2+2i}&=\frac{e^{it}}{2\sqrt{2}e^{i{\pi\over 4}}} =\frac{1}{2\sqrt{2}}e^{i(t{\pi\over 4})} \\ \implies \Re\frac{e^{it}}{2+2i} &=\frac{1}{2\sqrt{2}}\Re e^{i(t{\pi\over 4})} =\frac{1}{2\sqrt{2}}\cos\left(t\frac{\pi}{4}\right) \end{align*}