In general, there is no simple formula or procedure one can follow to find solutions. In the next few lectures, we will look at cases where solutions are not difficult to obtain. In this section, we consider the case when \(f\) is a function of \(x\) alone, that is, the equation is
\begin{equation*}
y(x) = \int f(x) \,dx + C .
\end{equation*}
This \(y(x)\) is actually the general solution. So to solve (1.1), we find some antiderivative of \(f(x)\) and then we add an arbitrary constant to get the general solution.
Example1.1.1.
Find the general solution of \(y' = 3 x^2\text{.}\)
Elementary calculus tells us that the general solution must be \(y = x^3 + C\text{.}\) Let us check by differentiating: \(y' = 3x^2\text{.}\) We got precisely our equation back.
Now is a good time to discuss a point about calculus notation and terminology. Calculus textbooks muddy the waters by talking about the integral as primarily the so-called indefinite integral. The indefinite integral is really the antiderivative (in fact the whole one-parameter family of antiderivatives). There really exists only one integral and that is the definite integral. The only reason for the indefinite integral notation is that we can always write an antiderivative as a (definite) integral. That is, by the fundamental theorem of calculus we can always write \(\int f(x) \,dx + C\) as
\begin{equation*}
\int_{x_0}^x f(t) \,dt + C .
\end{equation*}
Hence the terminology to integrate when we may really mean to antidifferentiate. Integration is just one way to compute the antiderivative (and it is a way that always works, see the following examples). Integration is defined as the area under the graph, it only happens to also compute antiderivatives. For sake of consistency, we will keep using the indefinite integral notation when we want an antiderivative, and you should always think of the definite integral as a way to write it.
Normally, we also have an initial condition such as \(y(x_0) = y_0\) for some two numbers \(x_0\) and \(y_0\) (\(x_0\) is often 0, but not always). We can then write the solution as a definite integral in a nice way. Suppose our problem is \(y' = f(x)\text{,}\)\(y(x_0) = y_0\text{.}\) Then the solution is
Let us check! We compute \(y' = f(x)\) via the fundamental theorem of calculus, and by Jupiter, \(y\) is a solution. Is it the one satisfying the initial condition? Well, \(y(x_0) = \int_{x_0}^{x_0} f(t)\,dt + y_0 = y_0\text{.}\) It is!
Do note that the definite integral and the indefinite integral (antidifferentiation) are completely different beasts. The definite integral always evaluates to a number. Therefore, (1.2) is a formula we can plug into the calculator or a computer, and it will be happy to calculate specific values for us. We will easily be able to plot the solution and work with it just like with any other function. It is not so crucial to always find a closed form for the antiderivative.
Here is a good way to make fun of your friends taking second semester calculus. Tell them to find the closed form solution. Ha ha ha (bad math joke). It is not possible (in closed form). There is absolutely nothing wrong with writing the solution as a definite integral. This particular integral is in fact very important in statistics.
Using this method, we can also solve equations of the form
What we are doing seems like algebra with \(dx\) and \(dy\text{.}\) It is tempting to just do algebra with \(dx\) and \(dy\) as if they were numbers. And in this case it does work. Be careful, however, as this sort of hand-waving calculation can lead to trouble, especially when more than one independent variable is involved. At this point, we can simply integrate with respect to \(y\text{,}\)
\begin{equation*}
x(y) = \int \frac{1}{f(y)} \,dy + C .
\end{equation*}
Finally, we try to solve for \(y\text{.}\)
Example1.1.3.
Previously, we guessed \(y' = ky\) (for some \(k > 0\)) has the solution \(y=Ce^{kx}\text{.}\) We could have found the solution by integrating. First we note that \(y=0\) is a solution. Henceforth, we assume \(y\not= 0\text{.}\) We write
If we replace \(e^{-kD}\) with an arbitrary constant \(C\text{,}\) we can get rid of the absolute value bars (which we can do as \(D\) was arbitrary). In this way, we also incorporate the solution \(y=0\text{.}\) We get the same general solution as we guessed before, \(y = Ce^{kx}\text{.}\)
Example1.1.4.
Find the general solution of \(y' = y^2\text{.}\)
First we note that \(y=0\) is a solution. We can now assume that \(y \not= 0\text{.}\) Write
\begin{equation*}
x = \frac{-1}{y} + C .
\end{equation*}
We solve for \(y = \frac{1}{C-x}\text{.}\) So the general solution is
\begin{equation*}
y = \frac{1}{C-x} \qquad \text{together with} \qquad y = 0.
\end{equation*}
Note the singularities of the solution. If, for example, \(C=1\text{,}\) then the solution “blows up” as we approach \(x=1\text{.}\) See Figure 1.1. Generally, it is hard to tell from just looking at the equation itself how the solution is going to behave. The equation \(y' = y^2\) is very nice and defined everywhere, but the solution is only defined on the interval \((-\infty, C)\) or \((C, \infty)\text{.}\) Usually when this happens, we only consider the solution on one of these intervals and not both. For example, if we impose an initial condition \(y(0) = 1\text{,}\) then the solution is \(y=\frac{1}{1-x}\text{,}\) and we would consider this solution only for \(x\) on the interval \((-\infty,1)\text{.}\) In the figure, it is the left side of the graph.
Classical problems leading to differential equations solvable by integration are problems dealing with velocity, acceleration, and distance. You have surely seen these problems before in your calculus class.
Example1.1.5.
Suppose a car drives at a speed of \(e^{t/2}\) meters per second, where \(t\) is time in seconds. How far did the car get in 2 seconds (starting at \(t=0\))? How far in 10 seconds?
Let \(x\) denote the distance the car traveled. The equation is
\begin{equation*}
x' = e^{t/2} .
\end{equation*}
We just integrate this equation to get that
\begin{equation*}
x(t) = 2 e^{t/2} + C .
\end{equation*}
We still need to figure out \(C\text{.}\) We know that when \(t=0\text{,}\) then \(x=0\text{.}\) That is, \(x(0) = 0\text{.}\) So
\begin{equation*}
0 = x(0) = 2e^{0/2} + C = 2 + C .
\end{equation*}
Suppose that the car accelerates at \(\unitfrac[t^2]{m}{s^2}\text{.}\) At time \(t=0\) the car is at the 1 meter mark and is traveling at 10 \(\nicefrac{\text{m}}{\text{s}}\text{.}\) Where is the car at time \(t=10\text{?}\)
Well this is actually a second order problem. If \(x\) is the distance traveled, then \(x'\) is the velocity, and \(x''\) is the acceleration. The equation with initial conditions is
Once we solve for \(v\text{,}\) we can integrate and find \(x\text{.}\)
Exercise1.1.1.
Solve for \(v\text{,}\) and then solve for \(x\text{.}\) Find \(x(10)\) to answer the question.
ExercisesExercises
1.1.2.
Solve \(\frac{dy}{dx} = x^2+x\) for \(y(1)=3\text{.}\)
1.1.3.
Solve \(\frac{dy}{dx} = \sin (5x)\) for \(y(0)=2\text{.}\)
1.1.4.
Solve \(\frac{dy}{dx} = \frac{1}{x^2-1}\) for \(y(0)=0\text{.}\)
1.1.5.
Solve \(y' = y^3\) for \(y(0)=1\text{.}\)
1.1.6.
(little harder) Solve \(y' = (y-1)(y+1)\) for \(y(0)=3\text{.}\)
1.1.7.
Solve \(\frac{dy}{dx} = \frac{1}{y+1}\) for \(y(0)=0\text{.}\)
1.1.8.
(harder) Solve \(y'' = \sin x\) for \(y(0)=0\text{,}\)\(y'(0) = 2\text{.}\)
1.1.9.
A spaceship is traveling at the speed \(2t^2+1\)\(\nicefrac{\text{km}}{\text{s}}\) (\(t\) is time in seconds). It is pointing directly away from earth and at time \(t=0\) it is 1000 kilometers from earth. How far from earth is it at one minute from time \(t=0\text{?}\)
1.1.10.
Solve \(\frac{dx}{dt} = \sin(t^2)+t\text{,}\)\(x(0)=20\text{.}\) It is OK to leave your answer as a definite integral.
1.1.11.
A dropped ball accelerates downwards at a constant rate \(9.8\) meters per second squared. Set up the differential equation for the height above ground \(h\) in meters. Then supposing \(h(0) = 100\) meters, how long does it take for the ball to hit the ground.
1.1.12.
Find the general solution of \(y' = e^x\text{,}\) and then \(y' = e^y\text{.}\)
1.1.101.
Solve \(\frac{dy}{dx} = e^x + x\) and \(y(0) = 10\text{.}\)
Sid is in a car traveling at speed \(10t+70\) miles per hour away from Las Vegas, where \(t\) is in hours. At \(t=0\text{,}\) Sid is 10 miles away from Vegas. How far from Vegas is Sid 2 hours later?
Answer.
170
1.1.105.
Solve \(y' = y^n\text{,}\)\(y(0) = 1\text{,}\) where \(n\) is a positive integer. Hint: You have to consider different cases.
Answer.
If \(n \not= 1\text{,}\) then \(y={\bigl((1-n)x+1\bigr)}^{1/(1-n)}\text{.}\) If \(n=1\text{,}\) then \(y = e^x\text{.}\)
1.1.106.
The rate of change of the volume of a snowball that is melting is proportional to the surface area of the snowball. Suppose the snowball is perfectly spherical. The volume (in centimeters cubed) of a ball of radius \(r\) centimeters is \((\nicefrac{4}{3}) \pi r^3\text{.}\) The surface area is \(4 \pi r^2\text{.}\) Set up the differential equation for how the radius \(r\) is changing. Then, suppose that at time \(t=0\) minutes, the radius is 10 centimeters. After 5 minutes, the radius is 8 centimeters. At what time \(t\) will the snowball be completely melted?
Answer.
The equation is \(r' = -C\) for some constant \(C\text{.}\) The snowball will be completely melted in 25 minutes from time \(t=0\text{.}\)
1.1.107.
Find the general solution to \(y''''= 0\text{.}\) How many distinct constants do you need?