logo

Differential Equations for Physics: Solutions to Commonly Encountered Differential Equations 📂Mathematical Physics

Differential Equations for Physics: Solutions to Commonly Encountered Differential Equations

Differential Equations

This has been explained as intuitively as possible for those studying undergraduate physics.

A differential equation is, simply put, an equation that involves derivatives. Without any complications, since acceleration is the second derivative of position, the most famous physics formula $F=ma$ is also a differential equation.

The polynomial $x^{3}+3x+1=0$ is called a third-degree equation because its highest order is 3. Similarly, when the maximum number of times differentiated in a differential equation is $n$, that differential equation is called a $n$th-order differential equation. While it is often referred to as an nth-degree equation, it is more accurately an nth-order equation. Consider that $f^{\prime \prime}$ is called the second-order derivative, not the second derivative.

Let’s now accept and move on with the following facts:

  • Just as a $n$th-degree equation has $n$ solutions, a $n$th-order differential equation also has $n$ solutions.
  • The solution to a differential equation is also a solution when linearly combined.

A linear combination is the addition of the given objects multiplied by constants each, for example, the linear combination of $x$ and $y$ for constants $a, b$ would be expressed as $ax+by$.

General Solution

The general solution refers to a general form that can represent all solutions of a differential equation. The most familiar example of a general solution is the quadratic formula. The quadratic formula

$$ x = \dfrac{-b \pm \sqrt{b^{2}-4ac}}{2a} $$

represents the most general form of all solutions to a quadratic equation of the form $ax^{2} + bx + c = 0$. Let’s give another example. The solution to “find a function whose graph passes through $(0,3)$” could be

$$ y=x+3,\quad y=3x+3,\quad y=5x+3 $$

among others. If we want to succinctly represent all possible solutions at once, it would be as follows:

$$ y=ax+3 $$

Therefore, $y=ax+3$ is the general solution to the problem.

Solutions

Solving a differential equation means to find its general solution. The following four differential equations are frequently encountered when studying physics. Therefore, it’s good to memorize the solutions once they are understood.

Let $X=X(x)$ be a function of one variable, and $\alpha$ a constant.

First-Order Differential Equations

$$ \frac{ d X}{ dx }=\alpha X $$

The task is to find a function that, when differentiated, gives itself. As known from high school, this refers to $e^{x}$. The answer satisfying the condition of constant $\alpha$ is:

$$ X(x)=e^{\alpha x} $$

Since any coefficient multiplied in front still holds, the general solution is:

$$ X(x)=Ae^{\alpha x} $$

Where $A$ is an arbitrary constant.

Second-Order Differential Equations with Positive Coefficient

$$ \begin{equation} \frac{ d^{2}X }{ dx^{2} }=\alpha ^{2} X \end{equation} $$

A function that still remains itself and keeps its sign when differentiated twice is also the exponential function $e^{x}$. The answer that satisfies the condition of constant $\alpha$ is:

$$ X(x)=e^{\alpha x} $$

The reason for writing the constant as $\alpha$ instead of $\alpha ^{2}$ in $(1)$ is to cleanly express the solution. If expressed with $\alpha$, the solution would be $X(x)=e^{\sqrt{\alpha}x}$, which is less clean than the above case. And since $(-1)\times (-1)=1$:

$$ X(x)=e^{-\alpha x} $$

It’s also known that $(1)$ satisfies this solution. Therefore, the general solution is:

$$ X(x)=Ae^{\alpha x}+Be^{-\alpha x} $$

Here $A$, $B$ are constants.

Second-Order Differential Equations with Negative Coefficient

$$ \frac{ d ^{2}X}{ dx^{2} }=-\alpha^{2}X \tag{2} $$

A function that remains itself but changes sign when differentiated twice is well known to be $\cos x$ and $\sin x$. The answer that satisfies the conditions for constants is:

$$ X(x)=\cos (\alpha x),\quad X(x)=\sin ( \alpha x) $$

Therefore, the general solution is:

$$ X(x)=A\cos (\alpha x) +B\sin (\alpha x) \tag{3} $$

Here $A$, $B$ are constants. However, since the exponent of the exponential function includes the complex number $i$, it satisfies $(2)$ similarly, meaning $X(x)=e^{i\alpha x}$ and $X(x)=e^{-i\alpha x}$ are also solutions. Thus, the general solution is:

$$ X(x)=Ce^{i\alpha x}+De^{-i\alpha x} \tag{4} $$

Here $C$, $D$ are constants. By Euler’s formula $e^{i\alpha x}=\cos (\alpha x) + i \sin (\alpha x)$, sine and cosine functions can be interchanged with exponential functions, which means $(3)$ and $(4)$, while notationally different, are the same expression. In quantum mechanics, where the solution is a complex function (wave function), it’s common to use the exponential form including $i$, and in mechanics, where the solution is clearly a real function, it’s often expressed with $\cos$.

Second-Order Differential Equations with a Constant Term

$$ \begin{equation} \frac{ d ^{2} X}{ d x^{2}}=\pm\alpha^{2}X+\beta \end{equation} $$

$(1)$ and $(2)$ can be briefly expressed without coefficients as follows:

$$ \frac{ d ^{2}X}{ d x^{2} }\pm X=0 $$

This implies that differentiating $X$ and $X$ twice results in the same output, except for the sign difference. However, the inclusion of a constant term in the differential equation, as in $(5)$, implies differences beyond just the sign. To make $X$ and $X^{\prime \prime}$ differ by only the constant term, it’s simple. Consider that $X$ has a constant term. A constant term disappears upon a single differentiation, and naturally, it’s gone upon the second. Thus, incorporating another suitable constant multiplied by the constant term in $X$ solves it. The solution for $X^{\prime \prime}=\alpha^{2} X + \beta$ is:

$$ X(x)=Ae^{\alpha x} + B e^{-\alpha x} - \dfrac{\beta}{\alpha^{2}} $$

And the solution for $X^{\prime \prime}=-\alpha ^{2}X+C$ is:

$$ X(x)=Ce^{i\alpha x}+De^{-i\alpha x} - \dfrac{\beta}{\alpha^{2}} $$

Upon inserting these into $(5)$, their validity can be confirmed.