- Foundation
- About 14 min
- 5 practice questions
Direct integration: equations of the form dy/dx = f(x)
Solve dy/dx = f(x) and d²y/dx² = f(x) by integrating once or twice, count the arbitrary constants, and use given conditions to find a particular solution, including a simple motion problem.
If something looks wrong, please tell us.
The simplest differential equations ask for a function when you are told its derivative as a function of x alone. They are solved by integration, and they are the building block for everything else in the course. In this lesson we meet first-order and second-order equations of this type, see how many constants appear, and use conditions to fix them.
First order: dy/dx = f(x)
If dy/dx = f(x), then y is an antiderivative of f: y = ∫ f(x) dx + C. One integration gives one arbitrary constant C. This is the general solution, a whole family of curves that differ only by a vertical shift. A condition such as 'the curve passes through (1, 2)' picks out one curve, the particular solution.
Higher order: dⁿy/dxⁿ = f(x)
For d²y/dx² = f(x), integrate once to get dy/dx = ∫ f dx + C₁, then integrate again to get y = ∫ (∫ f dx + C₁) dx + C₂. Each integration brings in a new constant, so an equation of order n solved by integrating n times has n arbitrary constants. To find them you need n conditions.
dⁿy/dxⁿ = f(x): integrate n times; the general solution has n arbitrary constants; n conditions fix them. Always check by differentiating your answer back.
Worked example 1: a first-order equation with a condition
Solve dy/dx = 3x² − 4x + 5 with y = 2 when x = 1. Integrating: y = x³ − 2x² + 5x + C. Put x = 1 and y = 2: 1 − 2 + 5 + C = 2, so C = −2. The particular solution is y = x³ − 2x² + 5x − 2. Check: its derivative is 3x² − 4x + 5, as required.
Worked example 2: trigonometric and exponential terms
Solve dy/dx = cos 2x + e⁻ˣ. Integrate term by term: ∫ cos 2x dx = (1/2) sin 2x (do not forget the 1/2 from the chain rule) and ∫ e⁻ˣ dx = −e⁻ˣ. So y = (1/2) sin 2x − e⁻ˣ + C. Differentiating gives cos 2x + e⁻ˣ, confirming the result.
Worked example 3: a logarithm
Solve dy/dx = 1/x for x > 0, given y = 3 when x = 1. Then y = ln x + C. With ln 1 = 0 we get C = 3, so y = ln x + 3. When x = e, y = 1 + 3 = 4.
Worked example 4: a second-order equation
Solve d²y/dx² = 6x − 4 with y = 1 and dy/dx = 2 when x = 0. First integration: dy/dx = 3x² − 4x + C₁. Using dy/dx = 2 at x = 0 gives C₁ = 2. Second integration: y = x³ − 2x² + 2x + C₂. Using y = 1 at x = 0 gives C₂ = 1. So y = x³ − 2x² + 2x + 1. Check: y′ = 3x² − 4x + 2 (equal to 2 at x = 0) and y″ = 6x − 4. At x = 1, y = 1 − 2 + 2 + 1 = 2.
Worked example 5: motion
A particle moves in a straight line with constant acceleration −10 m/s² (an illustrative value) so that d²s/dt² = −10. It starts at s = 0 with speed 20 m/s. Then ds/dt = −10t + 20, and s = −5t² + 20t. The speed is zero when t = 2, and then s = −20 + 40 = 20. So the greatest displacement is 20 m, reached after 2 seconds.
Key takeaways: dy/dx = f(x) is solved by one integration and has one constant; an equation of order n of the form dⁿy/dxⁿ = f(x) needs n integrations and n conditions. Do not forget the chain-rule factor when integrating functions like cos 2x, and check by differentiating.
Check your understanding
-
1. The solution of dy/dx = 3x² − 4x + 5 that passes through (1, 2) is:
- y = x³ − 2x² + 5x + 2
- y = x³ − 2x² + 5x − 2
- y = x³ − 2x² + 5x
- y = 3x² − 4x + 5
Show answer
Answer: B. Integrating gives y = x³ − 2x² + 5x + C. At x = 1, 1 − 2 + 5 + C = 2, so C = −2. y = 3x² − 4x + 5 is the derivative, not the solution.
-
2. What is the general solution of dy/dx = cos 2x?
- y = 2 sin 2x + C
- y = −(1/2) sin 2x + C
- y = sin 2x + C
- y = (1/2) sin 2x + C
Show answer
Answer: D. ∫ cos 2x dx = (1/2) sin 2x + C, because the derivative of sin 2x is 2 cos 2x. Differentiating the answer gives cos 2x.
-
3. How many arbitrary constants does the general solution of d³y/dx³ = 12x contain?
- 3
- 1
- 2
- 4
Show answer
Answer: A. Integrating three times brings in one constant each time, so the general solution has three arbitrary constants. Three conditions would be needed to fix them.
-
4. If d²y/dx² = 6x − 4, with y = 1 and dy/dx = 2 at x = 0, what is y when x = 1?
- 1
- 4
- 2
- 0
Show answer
Answer: C. The solution is y = x³ − 2x² + 2x + 1. At x = 1, y = 1 − 2 + 2 + 1 = 2.
-
5. If dy/dx = 1/x for x > 0 and y = 3 when x = 1, what is y when x = e?
- 3
- 1 + 3e
- e + 3
- 4
Show answer
Answer: D. y = ln x + 3 since ln 1 = 0. At x = e, ln e = 1, so y = 4.
Sign in to keep track of the lessons you finish.