Solving $\dfrac{dy}{dx} = f(x)$
The simplest class of differential equation — where the right-hand side involves only $x$ — is solved in a single move: integrate both sides with respect to $x$. But that "+C" is not just a formality; it represents an entire family of curves. An initial condition collapses the family to one particular solution. In this lesson you'll master the technique, apply initial conditions, and see how direct integration connects to the direction fields you studied in Lesson 9.
Given $\dfrac{dy}{dx} = 3x^2$ with initial condition $y(0) = 5$. Without working through all the steps — what do you expect $y(2)$ to be? Write your reasoning below.
When $\dfrac{dy}{dx} = f(x)$ — with the right side involving only $x$ — the equation is asking: which function $y$ has derivative $f(x)$? The answer is any antiderivative:
Integrate both sides with respect to $x$:
$$\int \frac{dy}{dx}\,dx = \int f(x)\,dx \quad\Longrightarrow\quad y = \int f(x)\,dx$$
The result is a family of solutions — one for each value of $C$. An initial condition $y(x_0) = y_0$ pins down $C$, selecting the particular solution.
Key facts
- $\dfrac{dy}{dx} = f(x)$ is solved by $y = \displaystyle\int f(x)\,dx = F(x) + C$
- The general solution is a family of curves parameterised by $C$
- An initial condition $y(x_0) = y_0$ determines a unique $C$ and a particular solution
Concepts
- Why all antiderivatives of $f(x)$ differ only by a constant
- The geometric meaning of $C$: it shifts the solution curve vertically
- How direct integration produces the same family visible in the direction field
Skills
- Integrate standard functions to find the general solution of $\dfrac{dy}{dx} = f(x)$
- Apply an initial condition to find the particular solution and evaluate $y$ at a point
- Identify when direct integration applies and when it does not
To solve $\dfrac{dy}{dx} = f(x)$:
If an initial condition $y(x_0) = y_0$ is given, substitute to find $C$:
Answer to the hook: $\dfrac{dy}{dx} = 3x^2 \Rightarrow y = x^3 + C$. Using $y(0)=5$: $5 = 0 + C$, so $C=5$. Particular solution: $y = x^3 + 5$. Therefore $y(2) = 8 + 5 = \mathbf{13}$.
Particular solution: substitute initial condition $(x_0,y_0)$ into $y=F(x)+C$; solve for $C$; write $y=F(x)+C_0$.
Pause — copy the direct integration method: $y=\int f(x)\,dx+C$ and the geometric interpretation (family of parallel curves, one per value of $C$) into your book.
Quick check: What is the general solution of $\dfrac{dy}{dx} = 2x + 1$?
We just saw the direct integration method: $\frac{dy}{dx}=f(x)\Rightarrow y=\int f(x)\,dx+C$, giving a family of parallel curves indexed by $C$. That raises a question: how does one initial condition $y(x_0)=y_0$ collapse this infinite family to a single particular solution? This card answers it → substitute $x=x_0$ and $y=y_0$ into the general solution, solve for $C$, then write the particular solution.
The initial condition collapses the infinite family of solutions to exactly one particular solution. The steps are always the same:
- Find the general solution $y = F(x) + C$.
- Substitute the IC: replace $x$ with $x_0$ and $y$ with $y_0$.
- Solve the resulting equation for $C$.
- Write the particular solution with the computed $C$.
The particular solution is valid on the interval containing $x_0$ where $F(x)$ is defined (e.g. if $f(x) = \dfrac{1}{x}$, note that $x = 0$ is excluded).
The initial condition collapses the infinite family of solutions to exactly one particular solution. The steps are always the same:
Pause — copy the three-step particular solution procedure: (1) write general solution; (2) substitute the initial condition; (3) solve for $C$ and write the final answer into your book.
Did you get this? True or false: for $\dfrac{dy}{dx} = e^x$ with $y(0) = 3$, the particular solution is $y = e^x + 2$.
Worked examples · 3 in a row, reveal as you go
Solve $\dfrac{dy}{dx} = 4x^3 - 2x$ with $y(1) = 3$.
Solve $\dfrac{dy}{dx} = \cos x + e^x$ with $y(0) = 2$.
Solve $\dfrac{dy}{dx} = \dfrac{1}{x}$ with $y(1) = 0$, and hence find $y(e^2)$.
Fill the gap: For $\dfrac{dy}{dx} = 3x^2$ with $y(0) = 5$, the particular solution is $y = x^3 +$ .
Misconceptions to fix · the 3 traps that cost marks
Did you get this? True or false: the general solution of $\dfrac{dy}{dx} = \sin x$ is $y = -\cos x + C$.
Activities · practice with the ideas
Find the general solution of $\dfrac{dy}{dx} = 6x^2 - 4x + 1$.
Solve $\dfrac{dy}{dx} = e^{2x}$ with $y(0) = 1$. Hence evaluate $y(\ln 2)$.
Solve $\dfrac{dy}{dx} = \sec^2 x$ with $y\!\left(\dfrac{\pi}{4}\right) = 2$.
A particle moves along a line with velocity $v(t) = \dfrac{dy}{dt} = 3t^2 - 6t + 2$. Given $y(0) = 4$, find the position $y(3)$.
Explain why $\dfrac{dy}{dx} = y + x$ cannot be solved by direct integration, and describe the first step you would take instead.
Odd one out: Three of these particular solutions are correct. Which one is NOT?
Earlier you estimated $y(2)$ for $\dfrac{dy}{dx} = 3x^2$ with $y(0) = 5$.
The exact answer is $y(2) = 2^3 + 5 = \mathbf{13}$. The key insight: integrate $3x^2$ to get $x^3$, apply the IC to find $C=5$, then evaluate at $x=2$. The "+C" step is where many students stumble — without the IC, you'd have $y(2) = 8 + C$, which is not a number at all.
Pick your answer, then rate your confidence — that tells the system what to drill next. Each retry pulls a fresh mix from the bank.
Q1. Write the general solution of $\dfrac{dy}{dx} = 5x^4$. (1 mark)
Q2. Solve $\dfrac{dy}{dx} = 2x - 3$ with $y(2) = 1$. (2 marks)
Q3. A particle starts at position $s = 10$ when $t = 0$ and moves with velocity $\dfrac{ds}{dt} = 6t^2 + 4t - 1$. Find the position function $s(t)$ and hence find when the particle is at position $s = 14$. (3 marks)
Comprehensive answers (click to reveal)
Activity answers:
1. $y = 2x^3 - 2x^2 + x + C$.
2. General: $y = \dfrac{1}{2}e^{2x} + C$. $y(0)=1$: $1 = \dfrac{1}{2}+C$, so $C = \dfrac{1}{2}$. Particular: $y = \dfrac{1}{2}e^{2x}+\dfrac{1}{2}$. $y(\ln 2) = \dfrac{1}{2}e^{2\ln 2}+\dfrac{1}{2} = \dfrac{1}{2}(4)+\dfrac{1}{2} = \dfrac{5}{2}$.
3. General: $y = \tan x + C$. $y(\pi/4)=2$: $2 = 1 + C$, so $C=1$. Particular: $y = \tan x + 1$.
4. $y = t^3 - 3t^2 + 2t + C$. $y(0)=4 \Rightarrow C=4$. Particular: $y=t^3-3t^2+2t+4$. $y(3)=27-27+6+4=10$.
5. $\dfrac{dy}{dx}=y+x$ cannot be directly integrated because the right side contains $y$, which is not yet known as a function of $x$. One approach is to rearrange as $\dfrac{dy}{dx}-y=x$ (a first-order linear ODE) and use an integrating factor, or use separation of variables if possible.
Q1 (1 mark): $y = x^5 + C$ [1].
Q2 (2 marks): $y = x^2 - 3x + C$ [1]. $y(2)=1$: $1=4-6+C \Rightarrow C=3$. Particular: $y=x^2-3x+3$ [1].
Q3 (3 marks): $s = 2t^3+2t^2-t+C$ [1]. $s(0)=10 \Rightarrow C=10$, so $s=2t^3+2t^2-t+10$ [1]. Set $2t^3+2t^2-t+10=14$: $2t^3+2t^2-t-4=0$. Test $t=1$: $2+2-1-4=-1\neq0$. Test $t=1$ again — try rational roots; $t=1$ gives $-1$, $t=-1$ gives $2-2+1-4=-3$. By inspection or numerical methods, $t\approx 1.07$. (Accept $t=1$ for 1 mark if the cubic is correctly set up but not fully solved.) [1]
Five timed questions. Beat the boss to bank a tier — gold (90% + speed), silver (75%), or bronze (50%). Replays welcome.
⚔ Enter the arenaClimb platforms by answering direct integration questions. Lighter alternative to the boss.
Mark lesson as complete
Tick when you've finished the practice and review.