Differential EquationsSolving First-Order Equations1 of 7
Solving First-Order Equations · 1
What Is a Differential Equation?
In real problems, we rarely know the formula for a function over time up front, so we find it by writing down the rule for how it is changing right now.
1
Rules of Change
A differential equation is an equation that relates an unknown function to one or more of its derivatives. Instead of solving an algebraic equation like x+3=5 for a single mystery number, we are solving a rule of change for a whole mystery function: a curve over time.
Rules of Change
Here is how we write a differential equation for a cooling cup of coffee.
Text solution
Temperature gapWrite the difference between the coffee's current temperature T and the 20∘C room.
gap=T−20
Rate of changeSet the rate of temperature change dtdT equal to a constant −k times that gap, with a negative sign because heat flows out when the coffee is warmer than the room.
rate of changedtdT=−ktemperature gap(T−20)
At any moment, the temperature gap T−20 alone sets the slope dtdT of the temperature curve: steeply downward when the coffee is hot, flat right at 20∘C, and tilting upward if the coffee starts cooler than the room.
The temperature difference between the coffee and the 20°C room sets how fast the temperature changes (the slope) right at that moment.
When forces control motion, Newton's second law (F=ma) relates an object's position y to both its first derivative and its second derivative in the same rule:
No single technique solves every differential equation, so before trying to solve one, we check four things about it (its variables, derivative type, order, and linearity) to see what kind of equation we have.
Whether an equation uses ordinary derivatives d or partial derivatives ∂ depends on how many independent variables the unknown function has:
ODE: T(t) has one input tdtdT=−k(T−20)PDE: u(x,t) has two inputs x and t∂t∂u=c2∂x2∂2u
When finding the order of an equation, pay attention to where the number sits so you don't confuse taking a derivative several times with raising a derivative to an exponent:
first derivative, cubed (first-order)(dxdy)3+ydifferentiated 3 times (third-order)dx3d3y+y=0=0
Here is how we classify x2y′′′+sin(x)y′=exy and compare its linearity with the pendulum equation dt2d2θ+Lgsin(θ)=0.
Text solution
Identify the variablesIn prime notation, y is the unknown dependent variable, and the x in the coefficients shows that y is a function of x (so y′=dxdy).
x2y′′′+sin(x)y′=exy
Find the orderLook for the highest derivative in the equation, ignoring powers on the independent variable x.
third derivativey′′′⟹third-order ODE
Check linearity on the unknown functionIn the first equation, y,y′, and y′′′ are each just raised to the first power in their own terms, whereas in the pendulum equation the unknown angle θ is inside a sine function.
linear (only the input x is inside functions)x2y′′′+sin(x)y′=exynonlinear (unknown θ is inside sin)dt2d2θ+Lgsin(θ)=0
3
Slope Fields and Families of Solutions
A slope field is a grid of short dashes showing the slope a differential equation requires at each point on the graph, letting us see the curves that solve the equation even before we use algebra.
Slope Fields and Families of Solutions
Following the dashes for dtdy=y traces out a whole family of curves y=Aet, and choosing a starting point picks out the one curve that passes through it.
Setting the slope at every height gives a whole family of curves, and any starting point picks out the single curve through it.
Once we have a family of solutions, we use the starting point (the initial condition) to find the value of the constant A for our specific curve.
Text solution
Check the family of solutionsDifferentiate y=Aet to see that the derivative gives back the function itself for any constant A.
dtdy=dtd(Aet)=Aet=y
Use the initial conditionPlug the starting point t=0,y=3 into y=Aet to solve for A and find that one curve.
3=Ae0=A⟹y=3et
In the same way, the cooling coffee equation dtdT=−k(T−20) has a family of exponential solutions where A is the starting temperature gap above the 20∘C room at t=0:
T(t)=room temperature20+starting gapAe−kt
Key concepts
Any equation with a derivative of an unknown function (written as dtdy or with primes like y′ and y′′) is a differential equation, and solving it means finding that function. A first-order equation defines a slope field and produces an entire family of solution curves with a constant A (such as y=Aet for dtdy=y, or T(t)=20+Ae−kt for dtdT=−k(T−20)), while an initial condition like y(0)=3 fixes the value of A to pick out one curve (y=3et).
When reading a differential equation before solving it:
Variables and parameters
In dtdT=−k(T−20), the top variable T is the dependent variable (the unknown function), the bottom variable t is the independent variable (the input), and fixed constants like k are parameters. A single independent variable gives an ODE with ordinary derivatives d; multiple independent variables give a PDE with partial derivatives ∂ (like ∂t∂u=c2∂x2∂2u).
Order
Take the highest derivative in the equation, not the highest exponent. dx3d3y+y=0 is third-order, but (dxdy)3+y=0 only differentiates y once and is first-order.
Linear vs. nonlinear
Look only at the dependent variable and its derivatives. If each appears to the first power in its own term, the equation is linear, even when the independent variable has powers or functions like in x2y′′′+sin(x)y′=exy. If the unknown function or any of its derivatives is raised to a power ((y′)2+y=0,dtdy=y2), multiplied by another (y⋅y′′=t), or inside another function (sin(θ) in dt2d2θ+Lgsin(θ)=0), the equation is nonlinear.
4
Practice
1
In the differential equation mdt2d2h=−mg−cdtdh for a falling object of mass m in air with drag constant c and gravity g, identify the dependent variable, the independent variable, and the parameters.
Look at the derivative fraction dtdh: which variable is on top being differentiated, and which is on the bottom?
In the derivatives dt2d2h and dtdh, the variable on top is the height h (the unknown function we solve for) and the variable on the bottom is time t (the input h depends on); swapping top and bottom gives the common wrong answer that t is dependent and h is independent. The remaining letters m,g, and c are fixed constants rather than changing variables (don't count g as a variable just because it isn't attached to a derivative). Dependent variable: h; independent variable: t; parameters: m,g, and c.
2
State the order of each differential equation: (a) (dx2d2y)4+x(dxdy)5=y and (b) dx4d4y+(dxdy)2=y.
Reading the outer exponents 4 and 5 as derivative orders gives the wrong answer fifth-order (or eighth-order from multiplying 2×4), when 4 and 5 are only exponents on the derivatives.
Look inside the parentheses for how many times y is differentiated, rather than at the outer exponents raising the whole derivative.
(a)The derivatives in the equation are dx2d2y and dxdy. Reading the outer exponents 4 and 5 as derivative orders gives the wrong answer fifth-order (or eighth-order from multiplying 2×4), when 4 and 5 are only exponents on the derivatives. Because the highest derivative is dx2d2y, (a) is second-order.
(b)The derivatives are dx4d4y and dxdy, and the highest derivative is dx4d4y, so (b) is fourth-order.
3
For each equation, identify the independent and dependent variables and determine whether the equation is linear or nonlinear: (a) t3y′′−cos(t)y′+ety=0 and (b) x2y′′+y⋅y′=0.
Find the variable that never has a prime on it to identify the input, then check whether powers, products, or functions are applied to y and its derivatives or only to the input variable.
(a)The primes are on y and the other variable in the equation is t, so y is a function of t. Calling this equation nonlinear because of t3,cos(t), and et is a common mistake: those functions and powers are only on the independent variable t, while y,y′, and y′′ are each raised to the first power in their own terms. Independent variable: t; dependent variable: y;linear.
(b)Here y is a function of x. Checking only exponents and seeing first powers on y and y′ leads to the wrong answer linear; because the unknown y is multiplied by its derivative y′ in the term y⋅y′, the equation is nonlinear. Independent variable: x; dependent variable: y;nonlinear.
4
The wave equation ∂t2∂2w=c2∂x2∂2w models the height w of a vibrating guitar string at position x and time t, where c is a constant. Is this an ordinary differential equation (ODE) or a partial differential equation (PDE), what is its order, and is it linear or nonlinear?
Count how many independent variables w depends on in the ∂ denominators, find the highest derivative, and check the power of w and its derivatives.
The unknown height w(x,t) depends on two independent variables (x and t) and uses partial derivatives ∂, making it a PDE. The highest derivative on either side is a second derivative (don't add the two second derivatives together to get fourth-order), and w and its derivatives appear only to the first power (don't let the squared constant c2 trick you into calling it nonlinear). Second-order, linear partial differential equation (PDE).
5
A sample of a chemical that breaks down over time has mass M(t) at time t. At any moment, the rate at which the mass decreases is a constant k times the square of the mass currently remaining. Write the differential equation for M(t), and state its order and whether it is linear or nonlinear.
Write "rate at which M decreases" as a derivative with the sign that matches a decreasing quantity, then check what is being squared.
The rate of change of M(t) is dtdM, and k times the square of the current mass is kM2. Leaving off the minus sign gives the common wrong equation dtdM=kM2, which would mean the mass is growing rather than decreasing. The highest derivative is the first derivative dtdM, and the unknown function M is squared. dtdM=−kM2;first-order and nonlinear.
6
A cup of coffee in a 20∘C room cools according to dtdT=−0.1(T−20), which has the family of solutions T(t)=20+Ae−0.1t. If the coffee starts at 90∘C at t=0, find the slope of its temperature curve on the slope field at T=90∘C and at T=30∘C, and find the value of A for this curve.
Forgetting the negative sign gives +7 and +1, which would mean the coffee is warming up.
Plug each temperature T directly into the differential equation to get the slopes, and plug t=0,T=90 into the solution family to solve for the starting gap A.
Plug T=90 and T=30 into dtdT=−0.1(T−20) to find the slopes (forgetting the negative sign gives +7 and +1, which would mean the coffee is warming up):
At T=90∘C:dtdTAt T=30∘C:dtdT=−0.1(90−20)=−7∘C per unit time=−0.1(30−20)=−1∘C per unit time
Plug t=0 and T=90 into T(t)=20+Ae−0.1t:
90=20+Ae0=20+A
Using the starting temperature for A gives the common wrong answer A=90; subtracting the 20∘C room temperature gives the starting temperature gap.
Slope at 90∘C:−7∘C per unit time; slope at 30∘C:−1∘C per unit time; A=70.