**Seeing codes instead of equations? Refresh using F5 or CTRL + R until you see the equations.**

Differential equations are equations that involve derivatives of an unknown function. They can be written in the form: $F(x, y, y', y'', \ldots, y^{(n)}) = 0$ where $y$ is the unknown function, $x$ is the independent variable, $y'$ is the first derivative of $y$ with respect to $x$, $y''$ is the second derivative, and so on, up to $y^{(n)}$, which is the $n$th derivative. $F$ is a function that describes the relationship between these variables. Differential equations can be classified based on their order, which is the highest derivative that appears in the equation. For example, a first-order differential equation involves only the first derivative of the unknown function, while a second-order differential equation involves the second derivative, and so on. Differential equations can also be classified based on their type. For example, a "linear" differential equation involves the unknown function and its derivatives in a linear fashion, meaning that the function and its derivatives appear to the first power only. A "nonlinear" differential equation, on the other hand, involves the function and/or its derivatives in a nonlinear fashion, meaning that they may appear to higher powers or in more complicated forms. Solving differential equations involves finding a function that satisfies the equation. This can be a challenging task, and often involves the use of techniques such as separation of variables, integrating factors, or the method of undetermined coefficients.

In calculus, the notation "dy/dx" is used to represent the derivative of a function y with respect to its independent variable x. Geometrically, the derivative of a function at a given point gives the slope of the tangent line to the function at that point. Algebraically, the derivative of a function y with respect to x is defined as the limit of the difference quotient: $\frac{dy}{dx} = \lim_{h\to 0} \frac{y(x+h)-y(x)}{h}$ where h is a small increment in the independent variable x. In other words, the derivative represents the rate at which the dependent variable y is changing with respect to the independent variable x. For example, consider the function y = x^2. The derivative of y with respect to x is: $\frac{dy}{dx} = 2x$ which gives the slope of the tangent line to the function y = x^2 at any point x. At x = 1, for example, the derivative is: $\frac{dy}{dx} \Bigg|_{x=1} = 2(1) = 2$ which means that the slope of the tangent line to y = x^2 at x = 1 is 2.#### Degree and Order

In differential equations, "degree" and "order" are terms used to describe certain properties of the equations. The "degree" of a differential equation is the highest power of the highest derivative of the unknown function that appears in the equation. For example, the degree of the equation $y'' + 2xy' + x^2y = e^x$ is 2, because the highest power of the highest derivative ($y''$) is 2.

The "order" of a differential equation is the order of the highest derivative of the unknown function that appears in the equation. For example, the equation above is a second-order differential equation, because it involves the second derivative of the unknown function $y$. Differential equations can be classified based on their degree and order. For example, a second-order linear homogeneous differential equation is a differential equation of the form $a_2(x)y'' + a_1(x)y' + a_0(x)y = 0$ where $a_2(x)$, $a_1(x)$, and $a_0(x)$ are functions of $x$, and $y$ is the unknown function. This equation is second-order because it involves the second derivative of $y$, and it is linear because $y$, $y'$, and $y''$ appear only to the first power.

Solving differential equations often involves finding a function that satisfies the equation and any initial or boundary conditions. The solution to a differential equation of a certain order and degree may not always exist, or it may not be unique. The degree and order of a differential equation provide important information about the behavior of its solutions.

#### Range and Domain

In differential equations, the "domain" of a solution is the set of values of the independent variable for which the solution is defined. For example, if we have a differential equation that describes the motion of a particle, the domain of the solution might be the set of times over which the motion is being considered.

The "range" of a solution is the set of values of the dependent variable that the solution can take on. For example, if we have a differential equation that describes the population growth of a species, the range of the solution might be the set of all possible population sizes. It's worth noting that the domain and range of a solution can depend on the initial or boundary conditions that are imposed. For example, in the case of a differential equation that describes the motion of a particle, the domain might be restricted by the initial position and velocity of the particle. In some cases, the domain or range of a solution may be infinite or unbounded. For example, the solution to a differential equation that describes the temperature distribution in a rod might be defined over an infinite domain (the length of the rod) and take on values over an unbounded range (all possible temperatures). Understanding the domain and range of a solution to a differential equation is important in applications, as it can help us determine the behavior of the system we are studying. It can also help us check whether our solution is physically meaningful, or whether it violates any constraints or assumptions that we've made. We can express the differential $dy$ in terms of the derivative $\frac{dy}{dx}$ as follows: $dy = \frac{dy}{dx} dx$. Squaring both sides, we get: $dy^2 = \left(\frac{dy}{dx} dx\right)^2$. Expanding the right-hand side, we obtain: $dy^2 = \left(\frac{dy}{dx}\right)^2 dx^2$. As before, we can rewrite $dx^2$ as $(dx)^2$ since $dx$ is a real number, and therefore its square is non-negative. Thus, we get: $dy^2 = \left(\frac{dy}{dx}\right)^2 (dx)^2$. We can see that $dy^2$ and $(dx)^2$ are both non-negative, since they are the squares of real numbers. Therefore, the range of $dy^2$ and $(dx)^2$ is the non-negative real numbers, i.e., $[0, \infty)$. The domain of $dy^2$ and $(dx)^2$ is the same as the domain of $y$ and $x$, respectively. Since $y = f(x)$ is a differentiable function, its domain is the set of all values of $x$ for which the function is defined and differentiable. Similarly, the domain of $\frac{dy}{dx}$ is the set of all values of $x$ for which the derivative is defined and exists, which is also the domain of $x$.

##### Example

Consider the following differential equation: $\frac{dy}{dx} = \frac{1}{x}$. This differential equation describes the rate of change of the function $y$ with respect to $x$. The solution to this differential equation is: $y(x) = \ln |x| + C$ where $C$ is a constant determined by any initial or boundary conditions.

The domain of this solution is the set of values of $x$ for which the function is defined. In this case, the domain is: $\text{domain} = (-\infty, 0) \cup (0, \infty)$ since the natural logarithm function is not defined at $x = 0$. The range of the solution is the set of values that the function can take on. In this case, the range is: $\text{range} = (-\infty, \infty)$ since the natural logarithm function takes on all real values.

So, the domain of the solution to this differential equation is the set of all real numbers except for 0, and the range is the set of all real numbers. Understanding the domain and range of the solution can help us interpret the behavior of the system that the differential equation describes.

##### Example 2

Consider the following partial differential equation, known as the heat equation: $\frac{\partial u}{\partial t} = k \frac{\partial^2 u}{\partial x^2}$ where $u(x, t)$ is the temperature distribution in a one-dimensional rod, $k$ is a constant representing the thermal diffusivity of the material, and $x$ and $t$ are the spatial and temporal variables, respectively.

The solution to this differential equation is a function $u(x, t)$ that describes the temperature distribution in the rod as a function of position and time. The domain of the solution is the set of all pairs $(x, t)$ for which the solution is defined. In this case, the domain is: $\text{domain} = [0, L] \times [0, \infty)$ where $L$ is the length of the rod, since the temperature distribution is being considered over the length of the rod and over all time.

The range of the solution is the set of all possible temperature values that the function can take on. In this case, the range is not trivial to determine, since it depends on the initial and boundary conditions imposed on the system. However, we know that the temperature cannot be negative, and it is typically bounded above by some maximum temperature, so the range would be a subset of $[0, T]$, where $T$ is the maximum temperature.

Understanding the domain and range of the solution to the heat equation is important in applications such as materials science, where accurate predictions of temperature distributions are crucial for designing and optimizing materials and manufacturing processes.

### Auxiliary Equation

The auxiliary equation, also known as the characteristic equation, is derived from a homogeneous differential equation by replacing each derivative with a power of the variable $m$. For a homogeneous second order differential equation of the form $a y'' + b y' + c y = 0$, the auxiliary equation is given by:

$am^2 + bm + c = 0$

#### Rule 1: Exponential terms

If the non-homogeneous term is of the form $e^{ax}$, the Particular Integral can be found using the rule: $$\frac{1}{f(D)}e^{ax} = \frac{1}{f(a)}e^{ax}$$ where $f(D)$ is the operator polynomial derived from the homogeneous equation and $f(a)$ is the function derived by replacing each operator $D$ with $a$.

#### Rule 2: Trigonometric terms

If the non-homogeneous term is of the form $\sin(ax)$ or $\cos(ax)$, the Particular Integral can be found using the rule: $$\frac{1}{f(D^2)}\sin(ax) = \frac{\sin(ax)}{f(-a^2)}$$ or $$\frac{1}{f(D^2)}\cos(ax) = \frac{\cos(ax)}{f(-a^2)}$$ where $f(D^2)$ is the operator polynomial derived from the homogeneous equation and $f(-a^2)$ is the function derived by replacing each operator $D^2$ with $-a^2$.

#### Rule 3: Expansion

If the operator polynomial $f(D)$ or $f(D^2)$ in the denominator is of higher degree, the rule of expansion can be used. It involves expanding the operator polynomial as per Binomial theorem or Maclaurin series, as appropriate, and applying the inverse operator term by term.

Rule 3 involves the expansion of the operator polynomial, especially when the operator polynomial is of higher order. This process utilizes the principles of the Binomial theorem or Maclaurin series, as appropriate. The formula for expansion as per the Binomial theorem is: $ (x+y)^n = \sum_{k=0}^{n} \binom{n}{k} x^{n-k} y^k $

When expanding as per the Maclaurin series, for a function $f(x)$, the formula is: $ f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \ldots $

Using these expansions, the inverse operator can be applied term by term.

In simpler terms: $$(1 + x)^n = 1 + \frac{{n \cdot x + n(n-1) \cdot x^2}}{{2!}} + \ldots$$

Example: \(\frac{1}{{D^2 + D + 3}} \cdot x = \frac{1}{{3 \cdot \left(1 - \frac{{D + D^2}}{{3}}\right)}}\)

#### Rule 4: Reduction of Order

If the differential operator in the denominator is of higher degree, we can reduce the order by applying the inverse operator repeatedly, each time reducing the order by one, until we reach an operator of order zero. Each application of the inverse operator will result in the integration of the function. This rule is particularly useful for finding PIs of non-homogeneous equations where the non-homogeneous term is a simple function of $x$.

Rule 4 applies to differential equations where the operator in the denominator is of higher order. This rule reduces the order of the differential equation by applying the inverse operator to the function repeatedly, each time reducing the order by one until we reach an operator of order zero. The repeated application of the inverse operator corresponds to the repeated integration of the function. If $f(D)$ represents the operator of the differential equation, and $y(x)$ is the function, then the repeated application of inverse operator corresponds to: $ f^{-1}(D)y(x) = \int \left( \int \ldots \int y(x) \, dx \ldots \right) dx $ where the number of integrations equals the order of the operator.

If the non-homogeneous term is a product of an exponential function and any other function, i.e., of the form $e^{ax}V$, then the Particular Integral (PI) can be found using the rule: $$\frac{1}{f(D)} \{ e^{ax} V \} = e^{ax} \left\{ \frac{1}{f(D+a)} V \right\}$$ where $f(D)$ is the operator polynomial derived from the homogeneous equation, and $f(D+a)$ is the function derived by replacing each operator $D$ with $(D+a)$.

#### Rule 5: Particular Solution of Non-homogeneous Equation

In this case, a general solution of the homogeneous equation is assumed first. The coefficients of the general solution are not arbitrary but are functions of $x$, giving a particular solution of the non-homogeneous equation. This is also known as the method of variation of parameters.

If the non-homogeneous term is a product of $x$ and any function $V$, i.e., of the form $xV$, the Particular Integral (PI) can be found using the rule: $$\frac{1}{f(D)} \{ xV \} = x \left\{ \frac{1}{f(D)} V \right\} - \frac{f'(D)}{(f(D))^2} V$$ where $f(D)$ is the operator polynomial derived from the homogeneous equation, and $f'(D)$ is its derivative with respect to $D$. The term $(f(D))^2$ refers to the operator polynomial squared.

#### Variation of Parameters

In the method of variation of parameters, the general solution of the homogeneous differential equation is assumed with variable coefficients. If the complementary function (CF) of a given differential equation is $y_c(x) = C_1 y_1(x) + C_2 y_2(x)$, then the particular integral is given by: $y_p(x) = -y_1(x) \int \frac{y_2(x) g(x)}{W(x)} dx + y_2(x) \int \frac{y_1(x) g(x)}{W(x)} dx$ where $W(x)$ is the Wronskian of $y_1(x)$ and $y_2(x)$, and $g(x)$ is the non-homogeneous term of the differential equation.

In simpler terms, $$(PI = u y_1 + v y_2)$$ where $$u = \int \frac{{-y_1 X}}{{W(y_1, y_2)}} \, dx$$ and $$v = \int \frac{{y_2 X}}{{W(y_1, y_2)}} \, dx$$ and Wronskian of $y_1$ and $y_2$ is: $$ W(y_1, y_2) = \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix} $$

### Complete Solution (CS)

The Complete Solution (CS) of a non-homogeneous differential equation is given by the sum of the Complementary Function and the Particular Integral. For a non-homogeneous differential equation of the form $a y'' + b y' + c y = g(x)$, the CS is given by:

$$y(x) = y_c(x) + y_p(x)$$

where $y_c(x)$ is the Complementary Function and $y_p(x)$ is the Particular Integral.

or in simpler words,

$$CS = CF + PI$$