Facebook Pixel
Mathos AI logo

Introduction to Differential Equations

Introduction to Differential Equations

What is a Differential Equation?

A differential equation is simply an equation that contains an unknown function and one or more of its derivatives. While standard algebraic equations are solved for a number (like x=5x = 5), differential equations are solved to find a function (like y=x2+3y = x^2 + 3).

For example, dydx=3y\frac{dy}{dx} = 3y or y′=3yy' = 3y is a differential equation. It asks: "What function yy has a derivative that is exactly 3 times the original function?"

Verifying a Solution

To verify if a given function is a solution to a differential equation, just plug the function and its derivative into the equation.

Example: Verify that y=Ce3xy = Ce^{3x} is a solution of y′=3yy' = 3y.

  1. Find the derivative: y′=ddx(Ce3x)=3Ce3xy' = \frac{d}{dx}(Ce^{3x}) = 3Ce^{3x}.
  2. Substitute into the right side: 3y=3(Ce3x)3y = 3(Ce^{3x}).
  3. Since y′=3yy' = 3y, the function is indeed a valid solution.

Solving Separable Differential Equations

A separable differential equation is a specific type of equation where you can completely separate the variables. You can move all the yy terms (including dydy) to one side of the equation and all the xx terms (including dxdx) to the other side.

Here are the steps to solve them:

  1. Separate the variables: Manipulate the equation so that it looks like g(y)dy=f(x)dxg(y)dy = f(x)dx.
  2. Integrate both sides: Set up the integrals: ∫g(y)dy=∫f(x)dx\int g(y)dy = \int f(x)dx.
  3. Solve for yy: Evaluate the integrals (don't forget to add a constant of integration, CC, to one side) and isolate yy if possible.

General Solutions vs. Initial Conditions

When you integrate, you get a +C+C in your equation. This creates a general solution, which represents an infinite family of functions.

To find a particular solution (a specific function), you need an initial condition. This is a given point, like y(0)=1y(0) = 1, which tells you that when x=0x = 0, y=1y = 1. You can plug these values into your general solution to solve for the exact value of CC.

Example Problem

Solve the differential equation dydx=2xy\frac{dy}{dx} = 2xy with the initial condition y(0)=1y(0) = 1.

Step 1: Separate the variables. Divide both sides by yy and multiply by dxdx: 1ydy=2xdx\frac{1}{y} dy = 2x dx

Step 2: Integrate both sides. ∫1ydy=∫2xdx\int \frac{1}{y} dy = \int 2x dx ln⁡∣y∣=x2+C\ln|y| = x^2 + C (Note: We only need to put the constant CC on the xx side.)

Step 3: Solve for yy (General Solution). Exponentiate both sides to get rid of the natural log: ∣y∣=ex2+C|y| = e^{x^2 + C} Using exponent rules, ex2+C=ex2⋅eCe^{x^2 + C} = e^{x^2} \cdot e^C. Since eCe^C is just another constant, we can rename it AA: y=Aex2y = A e^{x^2}

Step 4: Apply the initial condition. We know that y=1y = 1 when x=0x = 0. Plug these in to find AA: 1=Ae(0)21 = A e^{(0)^2} 1=A⋅1  ⟹  A=11 = A \cdot 1 \implies A = 1

Step 5: Write the final particular solution. Substitute A=1A = 1 back into the general solution: y=ex2y = e^{x^2}