CodeMathFusion

๐Ÿš€ Level 4 - Topic 1: Introduction to Differential Equations (Separable and First-Order ODEs) ๐ŸŒŸ

Unlocking the Language of Change

1) Introduction: What Are Differential Equations? ๐Ÿ“š

Welcome to the world of differential equations! These are equations that involve derivatives, describing how things change over time or spaceโ€”like population growth or cooling coffee. A differential equation relates a function to its derivatives. This topic introduces the basics, focusing on separable and first-order ordinary differential equations (ODEs).

Weโ€™ll cover:

  • Basics of ODEs: Understanding what they are and their importance.
  • Separable Equations: A method to solve certain ODEs by separating variables.
  • First-Order ODEs: General forms and solutions, including a brief look at other solution methods.
  • Real-world Applications: Seeing how ODEs model dynamic systems.
  • A look forward: A brief introduction to higher order and partial differential equations.
Letโ€™s start from the ground up! ๐ŸŽ‰

Quick Recap: Derivatives measure rates of change, and now weโ€™ll use them to model dynamic systems.

2) Basics of Differential Equations ๐ŸŽ“

A differential equation involves a function and its derivatives. For example, \( \frac{dy}{dx} = 2x \) is a simple ODE. The order is the highest derivative (first-order here), and it can be ordinary (one variable) or partial (multiple variables, coming later).

Definition 16.1: Differential Equation

A differential equation is an equation that includes derivatives of a function. A solution is a function \( y(x) \) that satisfies the equation when substituted.

Example: \( \frac{dy}{dx} = ky \) (exponential growth model).

Solutions can be general (with constants) or particular (with specific values). Letโ€™s explore a basic case.

Example 1: Verifying a Solution

Verify if \( y = e^{2x} \) solves \( \frac{dy}{dx} = 2y \).

  • Differentiate: \( \frac{dy}{dx} = 2e^{2x} \).
  • Check: \( 2y = 2e^{2x} \), which matches!

Answer: Yes, itโ€™s a solution.

Example 2: General Solution

Find the general solution to \( \frac{dy}{dx} = 3x^2 \).

  • Integrate: \( y = \int 3x^2 \, dx = x^3 + C \).

Answer: \( y = x^3 + C \).

3) Separable Differential Equations ๐Ÿ“

Separable equations are first-order ODEs where variables can be isolated on opposite sides, allowing integration. The form is \( \frac{dy}{dx} = g(x)h(y) \).

Definition 16.2: Separable Equation

A separable ODE can be written as \( \frac{dy}{h(y)} = g(x) \, dx \). Integrate both sides to solve.

Steps: Separate variables, integrate each side, and solve for \( y \).

Example 3: Basic Separation

Solve \( \frac{dy}{dx} = xy \).

  • Separate: \( \frac{dy}{y} = x \, dx \).
  • Integrate: \( \int \frac{1}{y} \, dy = \int x \, dx \).
  • Result: \( \ln|y| = \frac{x^2}{2} + C \).
  • Solve: \( y = \pm e^{\frac{x^2}{2} + C} = Ae^{\frac{x^2}{2}} \) (where \( A = \pm e^C \)).

Answer: \( y = Ae^{\frac{x^2}{2}} \).

Example 4: With Initial Condition

Solve \( \frac{dy}{dx} = 2xy \), \( y(0) = 1 \).

  • Separate: \( \frac{dy}{y} = 2x \, dx \).
  • Integrate: \( \ln|y| = x^2 + C \).
  • Exponential: \( y = e^{x^2 + C} = Ae^{x^2} \).
  • Apply \( y(0) = 1 \): \( 1 = Ae^0 \), so \( A = 1 \).

Answer: \( y = e^{x^2} \).

4) First-Order ODEs and General Forms ๐Ÿ”

First-order ODEs involve only the first derivative. Separable equations are a subset, but not all are separable. The general form is \( \frac{dy}{dx} = f(x, y) \).

Definition 16.3: First-Order ODE

A first-order ODE is \( \frac{dy}{dx} = f(x, y) \). A solution satisfies the equation for all \( x \) in the domain.

Non-separable ODEs may require other methods (e.g., integrating factors), but weโ€™ll focus on separable ones here.

Example 5: Non-Linear Separable

Solve \( \frac{dy}{dx} = \frac{y^2}{x} \).

This is a first-order, non-linear separable differential equation. We'll solve it step-by-step:

  1. Separate the variables:

    We want to get all terms involving \( y \) on one side and all terms involving \( x \) on the other. Divide both sides by \( y^2 \) and multiply both sides by \( dx \):

    \( \frac{1}{y^2} dy = \frac{1}{x} dx \)

  2. Integrate both sides:

    Integrate both sides of the equation with respect to their respective variables:

    \( \int \frac{1}{y^2} dy = \int \frac{1}{x} dx \)

    This is equivalent to:

    \( \int y^{-2} dy = \int x^{-1} dx \)

    Applying the power rule for integration on the left and the natural logarithm rule on the right, we get:

    \( -y^{-1} = \ln|x| + C \)

    Which simplifies to:

    \( -\frac{1}{y} = \ln|x| + C \)

  3. Solve for \( y \):

    Multiply both sides by -1:

    \( \frac{1}{y} = -\ln|x| - C \)

    Take the reciprocal of both sides:

    \( y = \frac{1}{-\ln|x| - C} \)

    We can also rewrite this as:

    \( y = -\frac{1}{\ln|x| + C} \)

Answer: \( y = -\frac{1}{\ln|x| + C} \).

Domain and Considerations:

  • The natural logarithm \( \ln|x| \) is defined only for \( x \neq 0 \).
  • The denominator \( \ln|x| + C \) cannot be zero, which imposes further restrictions on the domain.
  • The solution \( y \) cannot be zero.

Example 6: Real-World Application - Logistic Growth

A population grows according to the logistic model \( \frac{dy}{dt} = ry(1 - \frac{y}{K}) \), where \( r \) is the growth rate and \( K \) is the carrying capacity. Solve this with \( y(0) = y_0 \).

This model describes how a population grows exponentially at first, but then slows down as it approaches the carrying capacity of the environment.

  • Separate: \( \frac{dy}{y(1 - \frac{y}{K})} = r \, dt \).
  • Partial fractions: \( \frac{1}{y(1 - \frac{y}{K})} = \frac{1}{y} + \frac{1}{K-y} \).
  • Integrate: \( \int \left( \frac{1}{y} + \frac{1}{K-y} \right) dy = \int r \, dt \).
  • Result: \( \ln|y| - \ln|K-y| = rt + C \).
  • Simplify: \( \ln \left| \frac{y}{K-y} \right| = rt + C \).
  • Exponential: \( \frac{y}{K-y} = Ae^{rt} \) (where \( A = e^C \)).
  • Solve: \( y = \frac{KAe^{rt}}{1 + Ae^{rt}} \).
  • Apply \( y(0) = y_0 \): \( y_0 = \frac{KA}{1 + A} \), so \( A = \frac{y_0}{K-y_0} \).

Answer: \( y(t) = \frac{Ky_0e^{rt}}{K-y_0 + y_0e^{rt}} \). This solution shows how the population approaches \( K \) as \( t \) increases.

Brief Look at Other Methods: For non-separable first-order ODEs, techniques like integrating factors are used. For example, linear first-order ODEs of the form \( \frac{dy}{dx} + P(x)y = Q(x) \) can be solved using an integrating factor \( e^{\int P(x) \, dx} \). These methods will be covered in more advanced topics.

5) Practice Questions ๐ŸŽฏ

Fundamental Practice Questions ๐ŸŒฑ

Instructions: Solve the following separable differential equations. ๐Ÿ“š

\( \frac{dy}{dx} = 2xy \)

\( \frac{dy}{dx} = x^2 y \)

\( \frac{dy}{dx} = 3y \)

\( \frac{dy}{dx} = \frac{x}{y} \)

\( \frac{dy}{dx} = 4x^3 y^2 \)

\( \frac{dy}{dx} = e^x y \)

\( \frac{dy}{dx} = \frac{1}{x} y \)

\( \frac{dy}{dx} = \sin(x) y \)

\( \frac{dy}{dx} = \frac{y}{1+x^2} \)

\( \frac{dy}{dx} = \cos(x) (1 + y) \)

\( \frac{dy}{dx} = x e^{-y} \)

Challenging Practice Questions ๐ŸŒŸ

Instructions: Solve these advanced separable ODEs with initial conditions or interpretations. ๐Ÿง 

Solve \( \frac{dy}{dx} = \frac{y}{x} \), \( y(1) = 2 \), and verify.

Find the solution to \( \frac{dy}{dx} = ky(1 - \frac{y}{K}) \), \( y(0) = y_0 \), and describe its behavior for different \( y_0 \) values.

Determine \( \frac{dy}{dx} = x y^2 \), \( y(0) = 1 \), and check for singularities.

Evaluate \( \frac{dy}{dx} = \frac{\cos(x)}{y} \), \( y(0) = 1 \), and interpret physically (e.g., related to some physical oscillation).

Find the general solution to \( \frac{dy}{dx} = \frac{1 + y^2}{1 + x^2} \) and discuss its domain. Consider the solution when \( y(0) = 1 \).

6) Summary & Cheat Sheet ๐Ÿ“‹

6.1) Differential Equations

An equation involving derivatives; a solution is a function satisfying it.

6.2) Separable ODEs

Form \( \frac{dy}{h(y)} = g(x) \, dx \), integrate both sides.

6.3) First-Order ODEs

General form \( \frac{dy}{dx} = f(x, y) \); separable is a key type. Other methods (integrating factors) exist for non-separable cases.

6.4) Real-World Applications

ODEs model various phenomena like population growth (logistic model) and physical processes.

Youโ€™ve begun your differential equations journey! Next, weโ€™ll apply them to more real-world problems and explore other types of ODEs. ๐ŸŽ‰