Don’t Panic, Douglas Adams, The Hitchhiker’s Guide to the Galaxy.
“You’re really not going to like it,” observed Deep Thought. “Tell us!” “Alright,” said Deep Thought. “The Answer to the Great Question…” “Yes! …” “Of Life, the Universe and Everything…” said Deep Thought. “Yes! …” “Is …” said Deep Thought, and paused. “Yes! …” “Is …” “Yes!!!? …” Forty-two,” said Deep Thought, with infinite majesty and calm, Douglas Adams, The Hitchhiker’s Guide to the Galaxy.
An algebraic equation is a mathematical statement that declares or asserts the equality of two algebraic expressions. These expressions are constructed using:
Dependent and independent variables. Variables are symbols representing unknown quantities. Variables can be:
Independent Variables: Variables that can be chosen freely.
Dependent Variables: Variables that depend on the independent variables.
Constants. Fixed numerical values that do not change.
Algebraic operations. Operations such as addition, subtraction, multiplication, division, exponentiation, and root extraction.
An algebraic equation typically has the following form: Expression1 = Expression2, where the two expressions are set equal to each other.
Examples: y = 2x + 4 (simple linear equation, represents a straight line with a slope of 2 and a y-intercept of 4), ax2 + bx + c = 0 (quadratic equation, it represents a parabola), $ln(xy + t) = z·sin(\sqrt{x})$.
Definition. A differential equation is an equation that involves one or more functions and their derivatives. It relates the function itself (dependent variable), its derivatives with respect to one or more independent variables, and the independent variables themselves, e.g., $\frac{dy}{dx} = 3x +5y, y’ + y = 4xcos(2x), \frac{dy}{dx} = x^2y+y, etc.$
Key Components (e.g., $\frac{dy}{dx} = 3x +5y$):
To solve ordinary differential equations (ODEs), several methods can be employed, each suited to different types of equations. Here are some of the key methods:
Separation of Variables. This method is used for first-order ODEs that can be written in the form $\frac{dy}{dx} = g(x)h(y)$. By separating the variables, you integrate both sides separately: $\int \frac{dy}{h(y)} = \int g(x)dx + C$
Integrating Factors. This method is applied to linear first-order ODEs of the form $\frac{dy}{dx} + P(x)y = Q(x)$. The idea is to multiply the entire equation by an integrating factor μ(x) = $e^{\int P(x)dx}$, which simplifies the left-hand side into a product derivative, making the equation easier to solve: $\frac{d}{dx}(y·μ(x)) = Q(x)·μ(x)$. Integrating both sides gives the solution.
Exact Differential Equations. These are ODEs that can be expressed in the form of a total differential of a function, M(x,y)dx + N(x,y)dy = 0, where the exactness condition $\frac{∂M}{∂y} = \frac{∂N}{∂x}$ must be satisfied. If the equation is exact, you should find the potential function f(x, y) such that $\frac{∂f}{∂x} = M$ and $\frac{∂f}{∂y} = N$. The solution is f(x,y) = C.
Geometric Interpretations. This approach involves visualizing the solution in the phase plane or using graphical methods to understand the behavior of the solutions. For example, in autonomous differential equations, the phase plane can help in understanding the equilibrium points and the stability of the solutions.
Numerical Methods. For ODEs that cannot be solved analytically, numerical methods are used to find approximate solutions.
A pendulum is a device consisting of a weight, or bob, suspended from a pivot so that it can swing freely. When a pendulum is displaced sideways from its resting (equilibrium) position, it experiences a restoring force due to gravity, which accelerates it back toward the equilibrium. When released, this restoring force causes the pendulum to oscillate about the equilibrium position, swinging back and forth in a periodic motion (refer to Figure i for a visual representation).
For small swings (angular displacements), the motion of the pendulum approximates that of a harmonic oscillator and can be described by simple harmonic motion. In this case, the angular displacement θ(t) as a function of time t is given by: $θ(t) = θ_0cos(\sqrt{g/LT})$ where:
The linear displacement x along the arc of the swing is directly proportional to θ when θ is expressed in radians, as the arc length in a circle is related to its radius by x = Lθ. Gravity pulls downward with an acceleration of g, but only the component of gravity in the direction of motion is − given by mgsin(θ) - affects the pendulum’s motion. The negative sign indicates that this force is always pointing in the opposite direction of the displacement from equilibrium.
Starting from Newton’s second law, we have: $\vec{F} = m·\vec{a} = -mgsin(θ) ↭ \vec{a} = -gsin(θ) ↭[x = Lθ, x’’ = a = Lθ’’]Lθ’’ = -gsin(θ)$. Therefore, the equation of motion becomes: $θ’’ = \frac{-g}{L}sin(θ)$.
To create a more realistic model, we incorporate air resistance, which is generally proportional to the velocity and can be represented by the term -μθ’. The equation then becomes: $θ’’ = -μθ’ + \frac{-g}{L}sin(θ)$.
Differential equations like this are often difficult to solve analytically. In such cases, numerical or geometric methods are useful to understand the system’s behavior. Here, the state of the pendulum can be described by two variables: θ and θ′. Each point in this two-dimensional plane or phase space (θ, θ′) fully describes the state of the pendulum at any moment in time.
In the phase space, we observe (see Figure iv) an inward spiral pattern, indicating that with each swing, both the peak velocity and peak displacement decrease slightly due to energy loss from air resistance. This model suggests that the motion will eventually decay to a resting state at the origin (the equilibrium position).
A differential equation can also be visualized as a vector field. In this case, the pendulum’s state is represented by the vector: $(\begin{smallmatrix}θ(t)\\ θ’(t)\end{smallmatrix})$.
This vector has two components that vary over time. Taking the derivative of this state vector gives the rate of change, which describes the direction and speed of motion: $\frac{d}{dt}(\begin{smallmatrix}θ(t)\\ θ’(t)\end{smallmatrix}) = (\begin{smallmatrix}θ’(t)\\ θ’’(t)\end{smallmatrix}) = (\begin{smallmatrix}θ’(t)\\ -μθ’(t) + \frac{-g}{L}sin(θ(t))\end{smallmatrix})$.
Thus, we convert the second-order differential equation into a system of two first-order ordinary differential equations (ODEs).
Solving the equation involves understanding how the system evolves from an initial state, following a trajectory over time. In regions where θ′ is high (a pendulum with a high velocity), the vectors guide it to rotate fully a few times (the pendulum swings through a wider arc, possible completing multiple rotations) before settling into a downward spiral, eventually decaying into a stable back-and-forth motion (oscillations) that diminish over time (refer to Figure v for a visual representation).
Separable differential equations are a special class of differential equations that can be manipulated algebraically to separate the variables, allowing us to integrate and find solutions.
A separable differential equation is any differential equation that can be written in the form $\frac{dy}{dx}=f(x)g(y)$. This form allows us to separate the variables x and y on opposite sides of the equation, facilitating integration.
Solution: [1. Separate variables] $ydy = xdx ⇒[\text{2. Integrate both sides}] \int ydy = \int xdx ⇒ \frac{1}{2}y^2 = \frac{1}{2}x^2 + C ⇒[\text{3. Simplify the equation and Solve for y}] y^2 = x^2 + 2C$. Since C is arbitrary, we can rename 2C as C, so our general solution is $y^2 = x^2 + C$
Apply the initial condition y(0) = 2 ⇒ $2^2 = 0^2+C ⇒C = 4$. Therefore, our solution is $y^2 = x^2 + 4 ⇒ y = \sqrt{x^2 +4}$ because y(0) = 2 is a positive value, we take the positive root.
$\frac{dy}{dx}=-xy$⇒[Separate Variables] $\frac{dy}{y}=-xdx$ ⇒[Integrate Both Sides] $\int \frac{dy}{y}=-\int xdx ⇒[🚀] ln|y| = \frac{-x^2}{2}+C ⇒ $ (where y ≠ 0)
[🚀] When integrating, constants of integration may appear on both sides. They can be combined into a single constant: $ln|y|+c_1 = \frac{-x^2}{2}+c_2 ⇒ ln|y| = \frac{-x^2}{2}+c$ where c = c2 - c1.
Exponentiate both sides to eliminate the natural logarithm: $e^{ln|y|}= e^{\frac{-x^2}{2}+C} = e^{\frac{-x^2}{2}}·e^C ⇒ |y| = ae^{\frac{-x^2}{2}} ⇒ y = ±ae^{\frac{-x^2}{2}}$ where a = ec.
Verification. Besides, the solution $y = ae^{\frac{-x^2}{2}}$ works for any a because $-xy = a(-x)e^{\frac{-x^2}{2}}, \frac{dy}{dx}= a(\frac{-2x}{2})e^{\frac{-x^2}{2}}= a(-x)e^{\frac{-x^2}{2}}$ ∎
Therefore, we have a general solution or a “family” of solutions. If we know a initial condition, say y(0) = 3 ⇒ 3 = y = $ae^{\frac{-0^2}{2}} = a$ ⇒ y = $3e^{\frac{-x^2}{2}}$ and the ambiguity of the general solution is indeed solved.
Solution: [Let’s separate variables] $\frac{dy}{dx} = y(x^2+1) ⇒ \frac{1}{y}·dy = (x^2 + 1)dx ⇒[\text{Integrate Both Sides}] \int \frac{dy}{y} = \int (x^2 + 1)dx ⇒ ln|y| = \frac{x^3}{3}+x + c ⇒[\text{Exponentiate Both Sides}] e^{ln|y|} = e^{\frac{x^3}{3}+x + c} ⇒ |y| = A e^{\frac{x^3}{3}+x}$ where A = eC. Since y can be positive or negative, the general solution is: $y = ±Ae^{\frac{x^3}{3}+x}$
Solution: [Let’s separate variables] $\frac{1}{y^2}·\frac{dy}{dx} =x^3⇒ \frac{1}{y^2}dy = x^3dx ⇒[\text{Integrate Both Sides}] \int \frac{dy}{y^2} = \int x^3dx ⇒ \frac{-1}{y} = \frac{x^4}{4} + C ⇒ y = \frac{1}{-(\frac{x^4}{4} + C )} = \frac{1}{-\frac{x^4}{4}-C}$
$\frac{dy}{dx} = \frac{e^x}{y}$ ⇒[Let’s separate variables] $y·dy = e^xdx ⇒[\text{Integrate Both Sides}] \int y·dy = \int e^x dx ⇒ \frac{y^2}{2} = e^x + C$.
y(0) = 1, $\frac{1}{2} = e^0 + C = 1 + C ⇒ C = -\frac{1}{2} ⇒ \frac{y^2}{2} = e^x -\frac{1}{2} ⇒ y^2 = 2e^x -1 ⇒ y = ±\sqrt{2e^x-1}$. The particular solution satisfying the initial condition y(0) = 1 is: $y = \sqrt{2e^x-1}$.