First Order Equations: Integrals As Solutions
First Order Equations: Integrals As Solutions
Integrals as solutions
A first order ODE is an equation of the form
𝑑𝑦
=𝑓 ( 𝑥 , 𝑦)
𝑑𝑥
In general, there is no simple formula or procedure one can follow to find solutions but
there are special cases where solutions are not difficult to obtain.
Example: Find the general solution of 𝑦 ′ =3 𝑥2
𝑑𝑦 2
=3 𝑥
𝑑𝑥
𝑑𝑦=3
𝑥 2 𝑑𝑥
2
∫ 𝑑𝑦=∫ 3𝑥 𝑑𝑥
𝑦= 𝑥 3 +𝐶
Particular solution (initial-value problem)
We can then write the solution as a definite integral in a nice way and obtain a particular
solution.
𝑑𝑦 2
=3 𝑥
𝑑𝑥
𝑑𝑦=3
𝑥 2 𝑑𝑥 Do note that the definite integral and the indefinite
𝑦 𝑥
integral (antidifferentiation) are completely different
∫ 𝑑𝑦 =∫ 3 𝑥 𝑑𝑥 2 beasts.
𝑦0 0
𝑦 ¿ 1𝑦 = 𝑥 3 ¿𝑥0
The definite integral always evaluates to a number.
𝑦 −2 𝑑𝑦=𝑑𝑥
−2
∫ 𝑦 𝑑𝑦=∫ 𝑑𝑥
𝑦 −1 =𝑥+ 𝐴
−
1
=𝑥+ 𝐴
−𝑦
1 1
− 𝑦= 𝑦=
𝑥+𝐴 −( 𝑥+ 𝐴)
−1 1
𝑦= OR 𝑦= where
𝑥+ 𝐴 𝐶−𝑥
Another solution:
𝑑𝑦 2
=𝑦
𝑑𝑥
𝑑𝑥 1
=
𝑑𝑦 𝑦 2
𝑑𝑥=
𝑦 − 2 𝑑𝑦
−2
∫ 𝑑𝑥=∫ 𝑦
𝑦 −1
𝑑𝑦
𝑥= +C
−1
1
−( 𝑥 − 𝐶)=
𝑦
1
𝑦=
𝐶−𝑥
Plot
So the general solution of is: of when
1
𝑦=0 , 𝑦 =
𝐶 −𝑥
Generally,it is hard to tell from just looking at the equation itself how the solution is
going to behave.
The equation is very nice and defined everywhere, but the solution is only defined on
some interval or .
Usually when this happens we only consider one of these the solution. For example if
we impose a condition , then the solution is , and we would consider this solution only
for on the interval . In the figure, it is the left side of the graph.
Problemsin kinematics (those that deal with velocity, acceleration and distance) are
examples of classical problems that lead to differential equations solvable by integration
are.
Example: Suppose a car drives at a speed of meters per second, where t is time in
seconds. How far did the car get in 2 seconds (starting at )? How far in 10 seconds?
Solution:
Let denote the distance the car traveled.
𝑣 𝑡/2
( 𝑡 )=𝑒
𝑑𝑥 𝑡/2
=𝑒
𝑑𝑡
𝑡/2
𝑑𝑥=𝑒 𝑑𝑡
Integrating both sides of the equation, we get the general solution of the DE:
𝑥 ( 𝑡 ) =2 𝑒 𝑡 /2 +𝐶
Substituting the initial conditions into the general solution will give the value of :
0=2 𝑒0 +𝐶
𝐶=− 2
𝑥 ( 𝑡 ) =2 𝑒 𝑡 /2 − 2
𝑥 ( 𝑡 )=2(𝑒¿¿ 𝑡 /2 −1)¿
Now we just plug in to get where the car is at 2 and at 10 seconds. We obtain:
𝑥 ( 2 ) =2 ( 𝑒2 /2 − 1 ) =3.4366 m
𝑥 ( 10 ) =2 ( 𝑒10 /2 −1 ) =294.83 m
Answer:
𝑥 ( 2 ) =3.44 m
𝑥 ( 10 ) =295 m
Example: Suppose that the car accelerates at a rate of t2 m/s2. At time t = 0 the car is
at the 1 meter mark and is traveling at 10 m/s. Where is the car at time t = 10 s?
Solution:
EXERCISES:
5. Solve , .
6.
Juan is in a car traveling at speed mph away from SM City, where is in hours. At ,
He is away from SM City. How far from SM City is Juan later?
7. Solve , , where is a positive integer. Hint: you have to consider different cases.
8. The rate of change of the volume of a melting snowball is proportional to the surface
area of the snowball. Assuming that the snowball is perfectly spherical, the volume in
cubic cm of a ball of radius is . The surface area is . Write the differential equation
giving the rate of change of the radius of the snowball with respect to time. Then,
suppose that at time , the radius is , and after 5 min, the radius is . At what time will the
snowball be completely melted?
Slope fields
A lot of the times, we cannot simply find an explicit solution to the DE:
′
𝑦 =𝑓 ( 𝑥 , 𝑦 )
It would be nice if we could at least figure out the shape and behavior of the solutions
or find approximate solutions.
The equation 𝑦
′
=𝑓 ( 𝑥 , 𝑦 ) gives the slope at each point in the -plane.
We would ideally want to see the slope at every point, but that is just not possible.
Usually we pick a grid of points fine enough so that it shows the behavior, but not too fine
so that we can still recognize the individual lines.
We call this picture the slope field of the equation. Usually in practice, one does not do
this by hand, but has a computer do the drawing.
Slope field of
Slope field of with a graph of solutions
satisfying
Bylooking at the slope field we get a lot of information about the behavior of solutions
without having to solve the equation.
For example, we can see what the solutions do when the initial conditions are
A small change in the initial condition causes quite different behavior. We see this behavior
just from the slope field and imagining what solutions ought to do.
Forthe equation , the slope field shows that no matter what is, all solutions tend to zero as
tends to infinity.
Since generally the equations we encounter in applications come from real life situations,
it seems logical that a solution always exists.
Solution:
1′
𝑦=
𝑥
general
𝑦= ln |𝑥|+𝐶 solution
, .
Solution:
is a solution.
another solution is the function:
𝑥2 if 𝑥 ≥ 0 ,
𝑦 ( 𝑥 )= {
−𝑥
2
if 𝑥 ≤ 0.
If is continuous (as a function of two variables) and exists and is continuous near
some , then a solution to
exists (at least for some small interval of x’s) and is unique.
Exercises:
1. Sketch the slope field of . Can you visually find the solution that satisfies ?
4. Consider an equation of the form for some continuous function , and an initial
condition . Does a solution exist for all ? Why or why not?
Exercises:
6. Suppose
Does have a continuously differentiable solution? Does Picard apply? Why or why not?
Separable differential equations
𝑑𝑦
=𝑓 ( 𝑥 ) 𝑑𝑥
𝑔 ( 𝑦)
Both sides look like something we can integrate. If we can find closed form expressions
for these two integrals, we can, perhaps, solve for y.
Example: Find the general solution of the equation
𝑑𝑦
=𝑥𝑦
𝑑𝑥
𝑑𝑦
=𝑥𝑑𝑥
𝑦
𝑥2
ln | 𝑦|= +𝐶
2
2
𝑥
| 𝑦|=𝑒
( 2
+𝐶 )
2
𝑥
( )
| 𝑦|=𝑒 𝑒𝐶 2
2
𝑥
| 𝑦|= 𝐷𝑒
( ) 2 where is some constant;
𝑑𝑦
=2 𝑥𝑦
𝑑𝑥
𝑑𝑦
=2 𝑥𝑑𝑥
𝑦
ln | 𝑦|= 𝑥 2+ ln |𝐶 |
𝑦
ln | |
𝐶
=𝑥
2
𝑦 =𝑒 𝑥
|𝐶 | 2
We sometimes get stuck even if we can do the integration. Consider the following
separable differential equation:
′ 𝑥𝑦
𝑦= 2
𝑦 +1
We can find its solution by variables separation followed by integration:
𝑦 2 +1
𝑑𝑦 =𝑥𝑑𝑥
𝑦
1
( )
𝑦 + 𝑑𝑦=𝑥𝑑𝑥
𝑦
𝑦 2 𝑥2
+ ln | 𝑦|= +𝐶
2 2
Let : 𝑦 2+2 ln| 𝑦|= 𝑥 2 + 𝐷
It is not easy to find the solution explicitly as it is hard to solve for .
We, therefore, leave the solution in this form and call it an implicit solution.
It is still easy to check that an implicit solution satisfies the differential equation.
2
(
𝑦 ′ 2 𝑦+ =2 𝑥
𝑦 )
Multiply both sides by and divide by and you will get exactly the given differential
equation.
For each there are two choices of .
To find a function you would have to pick one of these two curves - the one that satisfies
your initial condition if you have one.
Solve .
Solution:
to get
Solution:
Let be the temperature of the coffee in let be the constant ambient (room) temperature,
also in .
Newton’s law of cooling states that the rate at which the temperature of the coffee is
changing is proportional to the difference between the temperature of the coffee and the
ambient temperature. That is,
𝑑𝑇
=− 𝑘 ( 𝑇 − 𝐴 )
𝑑𝑡
For our setup .
So
Solving for
We now obtain the equation that gives the temperature of the coffee at any time :
So IU can begin to drink the coffee at just over 9 minutes from the time she made it.
(That is probably about the amount of time it took us to calculate how long it would take)
where the independent variable is time in months. At time , there are 40 rabbits on the
island.
(a) Find the solution to the differential equation with the initial condition.
(b) How many rabbits are on the island in 1 month, 5 months, 10 months, 15 months (round
to the nearest integer).