In mechanical engineering, many physical phenomena such as motion, heat transfer, and fluid flow change continuously over time or space. To describe these changes mathematically, we use differential equations. A differential equation relates a function with its derivatives, capturing how the function changes. This makes differential equations powerful tools to model dynamic systems, predict behaviour, and design engineering solutions.
For example, the motion of a spring-mass system, the temperature distribution along a heated rod, or the velocity of fluid flowing through a pipe can all be described using differential equations. Understanding how to formulate and solve these equations is essential for engineers to analyze and control real-world systems.
An ordinary differential equation (ODE) is an equation involving a function of a single independent variable and its derivatives. The term "ordinary" distinguishes it from partial differential equations, which involve multiple independent variables.
Consider a function \( y = y(x) \), where \( x \) is the independent variable (often time or space), and \( y \) is the dependent variable (such as displacement, temperature, or velocity). An ODE relates \( y \), its derivatives like \( \frac{dy}{dx} \), \( \frac{d^2y}{dx^2} \), and possibly \( x \) itself.
The order of a differential equation is the highest order derivative present in the equation. For example, if the highest derivative is \( \frac{d^2y}{dx^2} \), the order is 2.
The degree of an ODE is the power (exponent) of the highest order derivative after the equation is free from radicals and fractions involving derivatives.
ODEs can be classified based on their order, linearity, and whether they are homogeneous or non-homogeneous. We will focus on first and second order ODEs, which are most common in engineering applications.
A first order ODE involves only the first derivative \( \frac{dy}{dx} \). These equations often describe rates of change, such as velocity or heat flow.
graph TD A[Given First Order ODE] --> B{Is it separable?} B -- Yes --> C[Use Separation of Variables] B -- No --> D{Is it linear?} D -- Yes --> E[Use Integrating Factor Method] D -- No --> F{Is it exact?} F -- Yes --> G[Use Exact Equation Method] F -- No --> H[Try other methods or transformations]A first order ODE is separable if it can be written as
We can rearrange terms to isolate \( y \) and \( x \) on opposite sides:
\[\frac{1}{h(y)} dy = g(x) dx\]Then integrate both sides to find the solution.
A first order ODE is linear if it can be expressed as
\[\frac{dy}{dx} + P(x) y = Q(x)\]where \( P(x) \) and \( Q(x) \) are known functions of \( x \). The integrating factor method is used to solve such equations.
An ODE of the form
\[M(x,y) dx + N(x,y) dy = 0\]is exact if there exists a function \( \psi(x,y) \) such that
\[\frac{\partial \psi}{\partial x} = M(x,y), \quad \frac{\partial \psi}{\partial y} = N(x,y)\]Solving exact equations involves finding \( \psi(x,y) = C \), where \( C \) is a constant.
Step 1: Recognize that the equation is separable because it can be written as
\[ \frac{dy}{dx} = x y \implies \frac{1}{y} dy = x dx \]Step 2: Integrate both sides:
\[ \int \frac{1}{y} dy = \int x dx \] \[ \ln |y| = \frac{x^2}{2} + C_1 \]Step 3: Solve for \( y \):
\[ y = e^{\frac{x^2}{2} + C_1} = C e^{\frac{x^2}{2}}, \quad \text{where } C = e^{C_1} \]Answer: The general solution is
\[ y = C e^{\frac{x^2}{2}} \]Step 1: Identify \( P(x) = 2 \) and \( Q(x) = 4 \).
Step 2: Calculate the integrating factor (IF):
\[ \mu(x) = e^{\int P(x) dx} = e^{\int 2 dx} = e^{2x} \]Step 3: Multiply both sides of the ODE by \( \mu(x) \):
\[ e^{2x} \frac{dy}{dx} + 2 e^{2x} y = 4 e^{2x} \]Left side is the derivative of \( y e^{2x} \):
\[ \frac{d}{dx} \left( y e^{2x} \right) = 4 e^{2x} \]Step 4: Integrate both sides:
\[ \int \frac{d}{dx} \left( y e^{2x} \right) dx = \int 4 e^{2x} dx \] \[ y e^{2x} = 2 e^{2x} + C \]Step 5: Solve for \( y \):
\[ y = 2 + C e^{-2x} \]Answer: The general solution is
\[ y = 2 + C e^{-2x} \]Second order ODEs involve the second derivative \( \frac{d^2y}{dx^2} \). These equations commonly arise in mechanical vibrations, beam deflections, and electrical circuits.
The general linear second order ODE with constant coefficients is
\[a \frac{d^2y}{dx^2} + b \frac{dy}{dx} + c y = f(x)\]where \( a, b, c \) are constants and \( f(x) \) is a known function. If \( f(x) = 0 \), the equation is homogeneous; otherwise, it is non-homogeneous.
To solve homogeneous second order ODEs, we assume solutions of the form \( y = e^{r x} \). Substituting into the homogeneous equation
\[a \frac{d^2y}{dx^2} + b \frac{dy}{dx} + c y = 0\]leads to the characteristic equation:
\[a r^2 + b r + c = 0\]The roots \( r \) determine the form of the general solution as shown above.
Step 1: Write the characteristic equation:
\[ r^2 - 3 r + 2 = 0 \]Step 2: Solve the quadratic equation:
\[ r = \frac{3 \pm \sqrt{(-3)^2 - 4 \times 1 \times 2}}{2} = \frac{3 \pm \sqrt{9 - 8}}{2} = \frac{3 \pm 1}{2} \] \[ r_1 = 2, \quad r_2 = 1 \]Step 3: Since roots are distinct real numbers, the general solution is:
\[ y = C_1 e^{2x} + C_2 e^{x} \]Answer: \( y = C_1 e^{2x} + C_2 e^{x} \)
Step 1: Solve the corresponding homogeneous equation:
\[ \frac{d^2y}{dx^2} + y = 0 \]Characteristic equation:
\[ r^2 + 1 = 0 \implies r = \pm i \]General solution of homogeneous part:
\[ y_h = C_1 \cos x + C_2 \sin x \]Step 2: Find a particular solution \( y_p \) for the non-homogeneous part. Since the right side is \( \cos x \), try:
\[ y_p = A x \sin x + B x \cos x \](We multiply by \( x \) because \( \cos x \) and \( \sin x \) are solutions of the homogeneous equation.)
Step 3: Compute derivatives:
\[ y_p = A x \sin x + B x \cos x \] \[ y_p' = A \sin x + A x \cos x + B \cos x - B x \sin x \] \[ y_p'' = 2 A \cos x - A x \sin x - 2 B \sin x - B x \cos x \]Step 4: Substitute into the ODE:
\[ y_p'' + y_p = \cos x \] \[ (2 A \cos x - A x \sin x - 2 B \sin x - B x \cos x) + (A x \sin x + B x \cos x) = \cos x \]Simplify terms:
\[ 2 A \cos x - 2 B \sin x = \cos x \]Step 5: Equate coefficients:
\[ 2 A = 1 \implies A = \frac{1}{2} \] \[ -2 B = 0 \implies B = 0 \]Step 6: Particular solution:
\[ y_p = \frac{1}{2} x \sin x \]Step 7: Write the general solution:
\[ y = y_h + y_p = C_1 \cos x + C_2 \sin x + \frac{1}{2} x \sin x \]Answer: \( y = C_1 \cos x + C_2 \sin x + \frac{1}{2} x \sin x \)
Differential equations are fundamental in modeling engineering systems. Let's explore some common applications.
Mechanical Vibrations: The motion of a spring-mass system is modeled by a second order ODE representing Newton's second law. The displacement \( x(t) \) satisfies
\[m \frac{d^2x}{dt^2} + k x = 0\]where \( m \) is mass and \( k \) is spring constant.
Heat Transfer: The temperature distribution \( T(x,t) \) along a rod follows the heat equation, a partial differential equation. In simplified cases, it reduces to ODEs describing temperature change over time.
Fluid Mechanics: Flow rate and pressure variations in pipes can be modeled using ODEs derived from conservation laws and fluid properties.
Step 1: Separate variables:
\[ \frac{1}{y} dy = x dx \]Step 2: Integrate both sides:
\[ \int \frac{1}{y} dy = \int x dx \implies \ln |y| = \frac{x^2}{2} + C \]Step 3: Solve for \( y \):
\[ y = C_1 e^{\frac{x^2}{2}} \]Answer: \( y = C_1 e^{\frac{x^2}{2}} \)
Step 1: Identify \( P(x) = 2 \), \( Q(x) = 4 \).
Step 2: Calculate integrating factor:
\[ \mu = e^{\int 2 dx} = e^{2x} \]Step 3: Multiply ODE by \( \mu \):
\[ e^{2x} \frac{dy}{dx} + 2 e^{2x} y = 4 e^{2x} \]Step 4: Left side is derivative:
\[ \frac{d}{dx} (y e^{2x}) = 4 e^{2x} \]Step 5: Integrate both sides:
\[ y e^{2x} = 2 e^{2x} + C \]Step 6: Solve for \( y \):
\[ y = 2 + C e^{-2x} \]Answer: \( y = 2 + C e^{-2x} \)
Step 1: Write characteristic equation:
\[ r^2 - 3 r + 2 = 0 \]Step 2: Solve quadratic:
\[ r = 1, 2 \]Step 3: Write general solution:
\[ y = C_1 e^{x} + C_2 e^{2x} \]Answer: \( y = C_1 e^{x} + C_2 e^{2x} \)
Step 1: Solve homogeneous equation:
\[ y_h = C_1 \cos x + C_2 \sin x \]Step 2: Try particular solution:
\[ y_p = A x \sin x + B x \cos x \]Step 3: Substitute and equate coefficients:
\[ A = \frac{1}{2}, \quad B = 0 \]Step 4: Write general solution:
\[ y = C_1 \cos x + C_2 \sin x + \frac{1}{2} x \sin x \]Answer: \( y = C_1 \cos x + C_2 \sin x + \frac{1}{2} x \sin x \)
Step 1: Write the governing equation:
\[ m \frac{d^2x}{dt^2} + k x = 0 \] \[ 2 \frac{d^2x}{dt^2} + 18 x = 0 \]Step 2: Simplify:
\[ \frac{d^2x}{dt^2} + 9 x = 0 \]Step 3: Characteristic equation:
\[ r^2 + 9 = 0 \implies r = \pm 3i \]Step 4: General solution:
\[ x(t) = C_1 \cos 3t + C_2 \sin 3t \]Answer: The mass oscillates with angular frequency \( 3\, \mathrm{rad/s} \) and displacement:
\[ x(t) = C_1 \cos 3t + C_2 \sin 3t \]When to use: At the start of solving any first order ODE.
When to use: When the ODE is in the form \( \frac{dy}{dx} + P(x) y = Q(x) \).
When to use: When solving homogeneous second order ODEs.
When to use: Applying method of undetermined coefficients.
When to use: During application-based problems.
Progress tracking is paywalled — subscribe to mark subtopics as understood and save your streak.
Go to practice →