Skip to main content
Logo image

Section Direct Integration

Solving a differential equation might sound like a new challenge, but you’ve actually done it before, in calculus! Any time you find an antiderivative, you’re solving a differential equation.
In this section, we’ll reframe antiderivatives as solutions to differential equations and use this perspective to introduce our first method: direct integration. By the end, you’ll be able to find general and particular solutions to simple differential equations using integration.

Checkpoint 37. πŸ€”πŸ’­ Review Question: Recall from Calculus...

Suppose you saw the following expression from calculus:
\begin{equation*} \frac{dy}{dx} = x^3 - 7. \end{equation*}
Select all of the true statements.
  • \(\quad y\) is the derivative of \(x^3 - 7\)
  • Saying \(y\) is the derivative of \(x^3 - 7\text{,}\) is the same as \(\left(x^3 - 7\right)' = y\)
  • \(\quad x^3 - 7\) is the derivative of \(y\)
  • This one should be the most straight forward.
  • \(\quad y\) is the antiderivative of \(x^3 - 7\)
  • Saying \(y\) is the antiderivative of \(x^3 - 7\) is the same thing as saying β€œwhen you take the derivative of \(y\) you shoud get \(x^3 - 7\)”
  • \(\quad x^3 - 7\) is the antiderivative of \(y\)
  • Saying \(x^3 - 7\) is the antiderivative of \(y\) is the same as saying β€œwhen you take the derivative of \(x^3 - 7\) you should get \(y\)”, which is not true.

πŸ“° Antiderivatives.

You might not realize it, but solving some differential equations is a skill you already have! For instance, computing the antiderivative of \(x^2\) means you’re finding a function \(y\) whose derivative is \(x^2\text{.}\) In other words:
β€œFind \(y\) such that the derivative of \(y\) is \(x^2\text{.}\)”
This is exactly the same as solving the differential equation:
β€œFind \(y\) such that \(\ds \frac{dy}{dx} = x^2\text{.}\)”
To solve this, we integrate both sides with respect to \(x\text{:}\)
\begin{align*} \int\frac{d}{dx}[y]\ dx \amp = \int x^2\ dx \\ y + c_1 \amp = \frac{1}{3} x^3 + c_2 \\ y \amp = \frac{1}{3} x^3 + (c_2 - c_1) = \frac{1}{3} x^3 + c \end{align*}
The constant \(c = c_2 - c_1\) absorbs the difference between the two integration constants. This is a standard simplification when solving differential equations.
\begin{equation*} y = \frac{1}{3}x^3 + c \end{equation*}

Checkpoint 38. πŸ“–β“ When it Comes to Constants, Less is More.

Combining constants is a common practice in differential equations.
  • True
  • Correct! Combining constants is an easy way to simplify a solution and is a standard practice in differential equations.
  • False
  • Incorrect, revisit the examples above.
Now let’s look at a slightly more involved example.

🌌 Example 39. Isolate \(y\).

Find the function, \(y\text{,}\) such that
\begin{equation*} 2y' - 4\sin x = 2\text{.} \end{equation*}
Solution.
This is another antiderivative problem where we first have to isolate \(y'\) before integrating, like so
\begin{equation*} y' = 1 + 2 \sin x\text{.} \end{equation*}
This equation now says β€œThe unknown \(y\) is the function whose derivative is \(1 + 2 \sin x\)” or, in other words,
β€œThe unknown \(y\) is the antiderivative of \(1 + 2 \sin x\)”.
Instead of writing down the antiderivative as our solution, let’s take the differential equations approach and integrate both sides of the equation with respect to \(x\)
\begin{align*} \int y'\ dx \amp = \int \left(1 + 2 \sin x\right) \ dx \\ y + c_1 \amp = x - 2 \cos x + c_2 \\ y \amp = x - 2 \cos x + \boxed{c_2 - c_1}\leftarrow c \\ y(x) \amp = x - 2 \cos x + c \end{align*}
As before, the constants of integration are combined into a single constant \(c\text{.}\) This practice of merging constants is standard in solving differential equations and simplifies the final result.

Checkpoint 40. πŸ“–β“ Finding \(y\).

Solving for \(y\) in the equation
\begin{equation*} \frac{dy}{dx} = \ln(3x+1) \end{equation*}
amounts to finding the antiderivative of \(\ln(3x+1)\text{.}\)
  • True
  • Correct, integrating both sides gives
    \begin{equation*} y = \int \ln(3x+1)\ dx \quad \leftarrow \text{anti-derivative of } \ln(3x+1)\text{.} \end{equation*}
  • False
  • Incorrect.
In summary, solving simple differential equations often reduces to finding the antiderivative of a function. By integrating both sides and simplifying constants, you can find the general solution.

Checkpoint 41. πŸ€”πŸ’­ Check Your Understanding.

(a) πŸ€”πŸ’­β“ How could you Find \(y\text{?}\)

How could you solve for \(y\) in the equation
\begin{equation*} \frac12\frac{dy}{dx} - \tan(2x) = x\text{?} \end{equation*}
  • Differentiating both sides with respect to \(x\text{.}\)
  • Incorrect, differentiating both sides only puts another derivative on \(\frac{dy}{dx}\text{.}\)
  • Isolate \(\frac{dy}{dx}\) and integrating both sides with respect to \(x\text{.}\)
  • Correct!
  • Isolate \(\frac{dy}{dx}\) and integrating both sides with respect to \(y\text{.}\)
  • Incorrect, the integration is not with respect to \(y\text{.}\)
  • Find the antiderivative of \(\tan(2x)\text{.}\)
  • Incorrect, the solution is the antiderivative of \(2\tan(2x) + 2x\text{,}\) not just \(\tan(2x)\text{.}\)

(b) πŸ€”πŸ’­β“ Solution ⇄ Antiderivative.

The solution to the differential equation
\begin{equation*} \frac13 y'- 7x + x^2 = 1 \end{equation*}
is the antiderivative of which function?
  • \(\quad y\)
  • Incorrect. \(y\) is the solution to the differential equation.
  • \(\quad 21x - 3x^2 + 1\)
  • Incorrect, perhaps check your algebra.
  • \(\quad 7x - x^2 - 1\)
  • Incorrect, perhaps check your algebra.
  • \(\quad 21x - 3x^2 + 3\)
  • Correct! Isolating \(y'\) gives
    \begin{equation*} y' = 21x - 3x^2 + 3\text{,} \end{equation*}
    so the solution is the antiderivative of \(21x - 3x^2 + 3\text{.}\)

πŸ“° Solving Differential Equations via Direct Integration.

We’ve seen that when you can isolate the derivative of \(y\) in the form:
\begin{equation*} \frac{d}{dx}[y] = f(x) \end{equation*}
you can solve the equation by integrating both sides. This idea also applies to more general equations where the derivative involves both \(x\) and \(y\text{:}\)
\begin{equation*} \frac{d}{dx}\left[g(x,y)\right] = f(x) \end{equation*}
Here, \(f(x)\) must depend only on \(x\text{,}\) and \(g(x,y)\) may involve both variables. This structure allows us to apply our first solution technique: direct integration.

✍🏻 Method 1. Direct Integration.

To solve a differential equation of the form
\begin{equation} \frac{d}{dx}\left[g(x,y)\right] = f(x)\text{,}\tag{8} \end{equation}
follow these steps:
Integrate Both Sides
Apply integration with respect to \(x\) to eliminate the derivative.
Solve for \(y\)
After integration, isolate \(y\) to get the general solution.

Checkpoint 42.

(a) πŸ“–β“ Does Direct Integration Apply?
Direct integration could be used to solve the equation
\begin{equation*} \frac{d}{dx}\left[y^2 + x^3\right] = \sqrt{x}\text{.} \end{equation*}
  • True
  • Correct!
  • False
  • Incorrect. This equation is in the form (8).
(b) πŸ“–β“ Why Doesn’t Direct Integration Apply Here?
Give the reason direct integration cannot be applied to the equation
\begin{equation*} \frac{d}{dx}\left[\frac{x}{y^2}\right] = \sin(x+y)\text{.} \end{equation*}
  • There is a fraction in the derivative.
  • Incorrect, direct integration doesn’t care about fractions.
  • The \(y\) term is squared.
  • Incorrect, direct integration can handle this.
  • There is a sine term on the right side of the equation.
  • Incorrect, the sine is not the issue here.
  • The right-hand side contains \(y\text{.}\)
  • Correct! Direct integration only works when the right-hand side contains only the independent variable, in this case \(x\text{.}\)
Consider the following examples to see how this approach applies to some more interesting problems.

🌌 Example 43. Integrate both sides to Recover \(y\).

Find the particular solution to the differential equation
\begin{equation*} \frac{d}{dx}\left[5x \cdot y\right] = \frac{1}{x^2} , \quad y\left(1\right) = -4\text{.} \end{equation*}
Solution.
First, observe that this problem is in the form
\begin{equation*} \frac{d}{dx}\left[g(x,y)\right] = f(x) \end{equation*}
where
\begin{equation*} g(x,y) = 5x \cdot y \quad \text{ and } \quad f(x) = \frac{1}{x^2}\text{.} \end{equation*}
So, we can solve for \(y\) using direct integration:
Integrating both sides with respect to \(x\text{,}\) we get
\begin{align*} \int \frac{d}{dx}\left[5x \cdot y\right]\ dx \amp = \int x^{-2}\ dx \\ 5x \cdot y + c_1 \amp = -x^{-1} + c_2 \end{align*}
Now that the dependent variable \(y\) is free from the derivative, we can isolate it to find the general solution, as follows
\begin{align*} y \amp = \frac{1}{5x}\Big(-\frac{1}{x} + \overset{=\ c}{\overbrace{c_2 - c_1}}\Big) \\ y \amp = \frac{1}{5x}\left(-\frac{1}{x} + c\right) \quad \leftarrow \ \text{general solution} \end{align*}
Since we are given the condition \(y\left(1\right) = -4\text{,}\) we need to find \(c\text{.}\)
\begin{align*} -4 \amp = \frac{1}{5}\left(-1 + c\right)\qquad \leftarrow \small\text{ multiply both sides by } 5 \\ -20 \amp = -1 + c \quad \implies \quad c = -19 \end{align*}
Therefore, the particular solution (for \(c=-19\)) is
\begin{equation*} y = \frac{1}{5x}\left(-\frac{1}{x} - 19\right)\text{.} \end{equation*}

Checkpoint 44. πŸ“–β“ First Step.

In the differential equation
\begin{equation*} \frac{d}{dx}\left[5x \cdot y\right] = \frac{1}{x^2}\text{,} \end{equation*}
what is the first step in solving for \(y\text{?}\)
  • Release \(y\) by integrating both sides with respect to \(x\text{.}\)
  • Correct! Integrating both sides is the first step in solving for \(y\text{.}\)
  • Release \(x\) and \(y\) by integrating both sides with respect to \(y\text{.}\)
  • Incorrect. Integrating both sides with respect to \(y\) would not eliminate the derivative since the derivative is with respect to \(x\text{.}\)
  • Compute the derivative of \(5x \cdot y\) using the product rule.
  • Incorrect. This would actually make the equation more complicated.
  • Isolate \(x\text{.}\)
  • Incorrect. This would not help solve for \(y\text{.}\)

🌌 Example 45. Isolate the Derivative before Integrating.

Compute the general solution of the differential equation
\begin{equation*} \frac{1}{\cos x}\frac{d}{dx}\Big[y\sin(2x)\Big] - 1 = \sec x \end{equation*}
Solution.
First, we get the derivative by itself on the left-hand side
πŸ“: ☝️ Recall the Identity.
\begin{align*} \frac{d}{dx}\Big[ y \sin(2x) \Big] \amp = \cos x\left( 1 + \frac{1}{\cos x} \right)\\ \frac{d}{dx}\Big[ \us{\textcolor{BurntOrange}{g(x,y)}}{\us{\textcolor{BurntOrange}{\uparrow}}{\ul{y\sin(2x)}}} \Big] \amp = \us{\textcolor{BurntOrange}{f(x)}}{\us{\textcolor{BurntOrange}{\uparrow}}{\ul{\cos x + 1}}} \end{align*}
Now, we integrate by sides with respect to \(x\text{,}\) releasing \(y\) from the derivative and allowing us to isolate the general solution.
\begin{align*} \int \frac{d}{dx}\Big[y\sin(2x)\Big]dx \amp = \int \left(\cos x + 1\right) \ dx \\ y\sin(2x) + c_1 \amp = \sin x + x + c_2 \\ y \amp = \frac{\sin x + x + c}{\sin(2x)} \qquad (c = c_2 - c_1)\text{.} \end{align*}
Direct integration is one of the simplest techniques for solving differential equations, provided the structure allows it. If you can isolate a derivative of \(y\) or an expression involving \(y\) and the right-hand side depends only on \(x\text{,}\) you’re in business. Just integrate both sides and solve for \(y\text{.}\)
This approach highlights how closely tied differential equations are to the core ideas of calculus.

πŸ“€ Wrap-Up.

πŸ—οΈ Key Takeaways...

  • When you can rearrange a differential equation so that a derivative is isolated on one side and equals a function of the independent variable, like
    \begin{equation*} \frac{dy}{dx} = f(x) \quad\text{or}\quad \frac{d}{dx}\left[x^2\cos(y)\right] = f(x) \end{equation*}
    the next step is to integrate both sides of the equation.
  • Doing so removes the derivative and allows you to isolate the unknown function \(y\text{.}\)
  • This process is called direct integration. It’s the simplest method for solving differential equations, and it lays the foundation for many techniques you’ll learn later.

Check Your Understanding.

Checkpoint 46. πŸ“–β“ Compute the General Solution.

Given the differential equation
\begin{equation*} y'= e^{2t} - 4t \end{equation*}
Find the general solution.
Press Activate to submit your answer.
\(y(t) =\)
Don’t forget the constant of integration. Do not use scripts on the constant (e.g., \(c_2\)).
You have attempted of activities on this page.