Differential EquationsSolving First-Order Equations2 of 7
Solving First-Order Equations · 2
Solutions and Initial Value Problems
In algebra we solve an equation for an unknown number, but in differential equations we are looking for an unknown function: an entire curve.
1
What Makes a Function a Solution
Consider the first-order differential equation
y′=y
Since y is the height of a curve and y′ is its slope, this equation asks for a continuous curve whose slope equals its height at every single point.
What Makes a Function a Solution
Text solution
Find the derivative of the functionDifferentiating y=ex gives the slope of the curve at any x:
y′=ex
Compare the slope and height in y′=ySubstituting both y′ and y shows that the two sides match for every x:
ex=ex
So y=ex is a solution to y′=y, tracing a continuous curve through (0,1) whose slope always matches the slope field.
2
Verifying a Solution by Substitution
Finding a solution from scratch takes different tools for different equations, but checking whether a function works only takes differentiation and substitution. Let's check whether y=4e−2x+3 is a solution to
y′+2y=6
Verifying a Solution by Substitution
yy′+2y=4e−2x+3=?6
Text solution
Differentiate the functionBy the chain rule, differentiating y=4e−2x+3 brings down −2 from the exponent and drops the constant 3:
y′=−8e−2x
Substitute y′ and y into the left side of the differential equationPlugging both expressions into y′+2y and distributing the 2 cancels the exponential terms completely:
y′+2y=(−8e−2x)+2(4e−2x+3)=−8e−2x+8e−2x+6=6
Because the left side simplifies to the right side 6 for all values of x,y=4e−2x+3 is a solution. Replacing the front number 4 with 10,−7, or even 0 (the flat line y=3) cancels the exponential term in the exact same way.
3
General Solutions and Initial Value Problems
Because the exponential terms cancel for any constant in front of e−2x when we substitute into y′+2y=6, we write C in that spot to put the infinite family of solutions into a single formula called the general solution:
y=arbitrary constantCe−2x+3
While for some other equations an extra solution can sit outside the general solution's formula, the general solution captures the main family of curves. To find the single curve from this family that passes through a known starting point, we pair the differential equation with an initial condition to form an initial value problem (IVP):
y′+2y=6,y(0)=5
General Solutions and Initial Value Problems
Notice that in differential equations, C often doesn't sit added onto the end like +C in an integral. Because of the algebra that happens after integrating, C gets worked into the function, such as multiplied in front of an exponential or inside a fraction.
Text solution
Substitute the initial point (0,5) into the general solutionSetting x=0 and y=5 in y=Ce−2x+3 turns the exponential into e0=1 and leaves an equation for C:
552=Ce−2(0)+3=C(1)+3=C
Substitute C back into the general solutionReplacing C with 2 gives the particular solution:
y=2e−2x+3
So y=2e−2x+3 is the one curve in the slope field that starts at height 5 when x=0 and approaches the flat equilibrium line y=3.
In the family y=Ce−2x+3, every starting point (0,y0) picks out one curve by setting the value of C: starting above y=3 gives a positive C where the curve goes down toward 3, starting below y=3 gives a negative C where the curve rises toward 3, and starting right on y=3 gives C=0, the flat equilibrium line.
Each starting height sets the constant in the equation and picks the one solution curve through that point.
4
Implicit Solutions
So far, our solutions have been written as y=some formula of x, which is called an explicit solution because y is by itself on the left. Often, solving a differential equation leaves x and y mixed together in an equation like y3+y=x2+C or x2+y2=C, which is called an implicit solution.
Let's verify that the circle family x2+y2=C is an implicit solution to
y′=−yx
and find the particular solution for y(3)=4.
Implicit Solutions
When we differentiate y2 with respect to x, remember that y is a function of x: the chain rule differentiates the outer square to give 2y, then multiplies by the derivative of the inside, y′.
Text solution
Differentiate both sides of the implicit equation with respect to xApplying implicit differentiation to x2+y2=C brings out y′ on the y-term and turns the constant C into 0:
dxd(x2+y2)2x+2y⋅y′=dxd(C)=0
Solve the resulting equation for y′Subtracting 2x and dividing by 2y gives us back the differential equation:
2y⋅y′y′=−2x=−yx
Substitute the initial point (3,4) directly into the implicit familyPlugging x=3 and y=4 into x2+y2=C finds C without solving for y first:
32+4225x2+y2=C=C=25
Select the square-root branch that matches the initial y-valueSolving x2+y2=25 for y splits the circle into y=±25−x2, and because y(3)=+4 is positive, the explicit solution is the top half:
y=25−x2
5
Second-Order Initial Value Problems
When the highest derivative in a differential equation is the second derivative y′′, integrating twice from y′′ back to y brings in two arbitrary constants, C1 and C2. For the second-order equation y′′−y=0, the general solution is y=C1ex+C2e−x. Because there are two constants to find, we need both a starting height and a starting slope:
y′′−y=0,y(0)=4,y′(0)=2
Second-Order Initial Value Problems
y′′−yy(0)y′(0)y=0=4=2=?
Always take the derivative of the general solution to get the formula for y′before plugging in x=0. If you plug numbers into y first, you only get a constant whose derivative is zero.
Text solution
Differentiate the general solution to get y′By the chain rule, differentiating e−x brings down a negative sign:
yy′=C1ex+C2e−x=C1ex−C2e−x
Substitute x=0 into both y and y′Using y(0)=4 in the first equation and y′(0)=2 in the second gives two equations for C1 and C2:
Solve the two equations for C1 and C2Adding the two equations cancels C2:
2C1C1C2=6=3=4−3=1
Substitute C1 and C2 back into the general solutionPutting C1=3 and C2=1 into y=C1ex+C2e−x gives the particular solution:
y=3ex+e−x
So y=3ex+e−x is the one curve that passes through (0,4) with a starting slope of 2 and satisfies y′′−y=0 everywhere.
For y′′−y=0, fixing the starting point at (0,4) still leaves infinitely many solution curves passing through (0,4) with different slopes; only when the starting slope y′(0) is also fixed do C1 and C2 give a single curve.
Infinitely many solution curves pass through this starting point, and the starting slope picks out just one of them.
6
The Interval of Validity
Even after we find the formula for a particular solution, that formula may be undefined at certain values of x. Because a solution to an initial value problem must be a single unbroken curve passing through the starting point, the interval of validity (or interval of existence) is the open interval between those breaks that contains the starting x-value.
The differential equation y′=y2 has the main family of solutions y=C−x1, since differentiating (C−x)−1 by the chain rule gives (C−x)21=y2. (The flat line y=0 is also a solution because 0=02, sitting outside the main family since C−x1 can never equal 0.) Let's solve the initial value problem
y′=y2,y(0)=1
find its interval of validity, and check whether y(2) exists for this solution.
The Interval of Validity
y′=y2,y(0)=1
−2
−1
1
2
−2
−1
1
2
(0,1)
y(2)=?
x
y
Text solution
Substitute the initial point (0,1) to find CPlugging x=0 and y=1 into y=C−x1 gives the formula for the particular solution:
11y=C−01=C=1−x1
Mark where the solution or differential equation is undefinedThe denominator 1−x is zero at x=1, creating a vertical asymptote that splits the number line into (−∞,1) and (1,∞).
Choose the open interval that contains the initial x-valueBecause the starting point has x0=0, which lies to the left of x=1, the interval of validity is:
(−∞,1)
Because the solution curve starting at (0,1) goes to infinity at the vertical asymptote x=1 and cannot jump across to the other branch, y(2) does not exist for this initial value problem, even though plugging x=2 into the formula 1−x1 gives −1.
Every curve in the family y=C−x1 is split into two branches by a vertical asymptote at x=C, and only the unbroken branch through (x0,y0) is the solution to the initial value problem. So starting at (0,1) and starting at (2,−1) give the exact same formula y=1−x1 on two completely different intervals of validity, (−∞,1) and (1,∞).
A solution is only the single unbroken branch of the curve that passes through the starting point, stopping at the vertical asymptote.
Key concepts
A differential equation asks for a curve whose derivatives match the equation at every point, and how you work with a solution depends on how it is written and how many constants it contains:
Checking a solution
Differentiate the function first and substitute it into the differential equation to see if both sides simplify to the exact same expression for all x (for y=4e−2x+3 in y′+2y=6, substituting gives (−8e−2x)+2(4e−2x+3)=6). When the solution is implicit like x2+y2=C, do not solve for y first. Differentiate both sides with respect to x using the chain rule on y-terms (2x+2y⋅y′=0⟹y′=−yx).
Finding constants for an Initial Value Problem (IVP)
First-order (C): Plug the starting point (x0,y0) directly into the general solution, even if it is implicit (32+42=C⟹C=25). If you then solve an implicit equation for y=f(x), use the sign of y0 to pick the matching square root (y(3)=+4 picks y=+25−x2). If plugging (x0,y0) into the main C family gives an impossible equation like C1=0 (as with y(0)=0 in y=C−x1 for y′=y2), don't stop there: check the flat equilibrium line (y=0) sitting outside the C family.
Second-order (C1,C2): Differentiate y to get the formula for y′before plugging in numbers, then substitute y(x0) into y and y′(x0) into y′ to solve the two equations (for y=C1ex+C2e−x with y(0)=4,y′(0)=2, solve C1+C2=4 and C1−C2=2).
Finding the interval of validity
A solution to an IVP is a single unbroken curve through (x0,y0). Mark all domain breaks (such as division by zero) on a number line and take only the open interval containing x0. For y=1−x1 with y(0)=1, the break at x=1 keeps the curve on (−∞,1), so y(2) does not exist.
7
Practice
1
Determine whether y=4e3x−2 and y=4e−3x−2 are solutions to the differential equation y′−3y=6.
Find y′ for each function first, then substitute both y′ and y into the left side y′−3y to see whether the exponential terms cancel.
For y=4e3x−2, differentiating gives y′=12e3x. Substituting into the left side gives
y′−3y=12e3x−3(4e3x−2)=12e3x−12e3x+6=6
(be careful with the sign when you distribute −3 to −2:−3 times −2 is +6, and a sign slip there gives −6 instead of 6). For y=4e−3x−2, the chain rule brings down a negative sign to give y′=−12e−3x (dropping that negative sign makes the exponentials wrongly cancel). Substituting into the left side gives
y′−3y=−12e−3x−3(4e−3x−2)=−24e−3x+6=6
y=4e3x−2 is a solution; y=4e−3x−2 is not a solution.
2
The differential equation y′+4y=12 has the general solution y=Ce−4x+3. Solve the initial value problem with y(0)=−2.
Substitute x=0 and y=−2 into the general solution and use e0=1 to solve for C.
Substituting x=0 and y=−2 gives −2=Ce−4(0)+3=C(1)+3 (don't just copy the initial value as C=−2 without subtracting 3, which gives the wrong curve y=−2e−4x+3, and don't treat e0 as 0). Subtracting 3 gives C=−5, so the particular solution is y=−5e−4x+3.
3
Verify by implicit differentiation that x2+4y2=C is an implicit solution to y′=−4yx. Then find the particular solution satisfying y(2)=−3, written both implicitly and explicitly as y=f(x).
Differentiate both sides with respect to x first, then plug (2,−3) directly into x2+4y2=C; check the sign of y(2)=−3 when choosing the square-root branch.
Differentiating x2+4y2=C with respect to x gives 2x+8y⋅y′=0, so y′=−8y2x=−4yx. Plugging x=2 and y=−3 into x2+4y2=C gives 22+4(−3)2=4+36=40=C. Solving x2+4y2=40 for y gives y=±10−4x2, and because the initial value y(2)=−3 is negative, we must choose the negative root (picking the positive root gives y=10−4x2, which passes through (2,3) instead of (2,−3)). Implicit solution: x2+4y2=40; explicit solution: y=−10−4x2.
4
The second-order differential equation y′′−4y=0 has the general solution y=C1e2x+C2e−2x. Solve the initial value problem with y(0)=5 and y′(0)=−2.
Differentiate y to find the formula for y′ before substituting x=0 into both equations.
Differentiating with the chain rule gives y′=2C1e2x−2C2e−2x (forgetting to multiply by 2 from the chain rule gives y′=C1e2x−C2e−2x, which leads to C1−C2=−2 and the wrong constants C1=23,C2=27). Substituting x=0 into y and y′ gives C1+C2=5 and 2C1−2C2=−2 (or C1−C2=−1). Adding the equations gives 2C1=4, so C1=2 and C2=3. The particular solution is y=2e2x+3e−2x.
5
The differential equation y′=2xy2 has the family of solutions y=C−x21. Solve the initial value problem with y(1)=31, give its interval of validity, and state whether y(3) exists for this solution.
After finding C, solve C−x2=0 to mark all vertical asymptotes on a number line and see which open interval contains x0=1.
Substituting x=1 and y=31 gives 31=C−121, so C=4 and y=4−x21. Setting 4−x2=0 shows that the formula is undefined at both x=−2 and x=2 (missing the negative root x=−2 gives the wrong interval (−∞,2), and plugging x=3 straight into 4−x21 gives the wrong value y(3)=−51 on the other side of the asymptote at x=2). Because the initial point x0=1 sits between −2 and 2, the particular solution is y=4−x21 on (−2,2), and y(3) does not exist.
6
The differential equation y′=(y−2)2 has the main family of solutions y=2+C−x1. Solve the initial value problem with y(0)=2 and state its interval of validity.
Try substituting (0,2) into the main family first; when no C works, check what happens to y′=(y−2)2 along the flat line y=2.
Plugging x=0 and y=2 into y=2+C−x1 gives 2=2+C1, or C1=0, which no number C satisfies (don't conclude that the initial value problem has no solution!). Instead, the flat line y=2 is an equilibrium solution sitting outside the C family, since y′=0 and (2−2)2=0, and it passes through (0,2) with no domain breaks. The particular solution is y=2 on (−∞,∞).