Chapter 4 Analytical Solutions for y=f(t)

4.1 General Solutions

We now develop a more direct way to solve some differential equations. While we can always “guess and check,” that approach is generally ineffective and is always inefficient. We start by considering a special subset of differential equations. ODEs with a right-hand side that is only a function of the independent variable, t, can sometimes be solved analytically. An analytical solution is one where the general solution can be found in a closed form. The Fundamental Theorem of Calculus (FToC) gives us the answer to

y=f(t)

because y(t) is the antiderivative of f(t).

Recall that the FToC is a critically important result that relates functions and their derivatives

y(t)dt=y(t)+C

To find all solutions to this type of ODE, we simply integrate both sides of the differential equation with respect to t. Applying indefinite integration to y=f(t) yields

ydt=f(t)dty(t)+C1=f(t)dt+C2y(t)=f(t)dt+C

Note: The constant C2 is generated when we integrate f(t). We know C2 exists, and we can track it separately. To simplify, we combine the integration constants as C=C2C1. We must carefully track the constants to ensure a complete and accurate solution.

4.1.1 Example #1

Solve the differential equation

y=e3t

Integrating both sides of the differential equation leads to a general form for the solution

ydt=e3tdty(t)+C1=13e3t+C2y(t)=13e3t+C

We conclude by saying: y(t)=13e3t+C is the general solution to the ODE y=e3t.

4.1.2 Example #2

Recall this example from the introduction

y=cos(t)

Integrating both sides of the ODE yields

ydt=cos(t)dty(t)+C1=sin(t)+C2y(t)=sin(t)+C

Note that when we integrate both sides of an equation, we end up with a constant of integration on both sides. Next, we always combine the two constants into a single constant. Because we always do this, it is common to only include the constant of integration on one side of they ODE, typically the right side, and understand that we have already combined the constants. We follow this practice throughout the rest of the text.

4.2 Initial Value Problems

Next, we consider how a specific value for the constant C can be determined. If the solution to the differential equation is known at a specific time, say t0, then a specific solution can be identified. For example, let t0=0 with the value y(0)=1. By applying this condition to the general solution, we can determine a unique value for C as

y(t)=sin(t)+C   and    y(0)=1,y(0)=sin(0)+C=1,sin(0)+C=1. Because sin(0)=0, we are left with C=1. Therefore, the solution to the differential equation, y(t)=cos(t), with the initial condition, y(0)=1, is

y(t)=sin(t)+1.

This solution satisfies BOTH the ordinary differential equation and the initial condition. In the figure below, all of the functions shown are solutions to the ODE. However, only the function in blue is a solution to the initial value problem. Note that the function in blue is the only solution among the family of solutions that passes through the point (t=0,y=1) specified in the initial condition.

Family of Solutions for $y' = \cos(t)$. Only the function in blue satisfies the initial condition $y(0)=1$.

Figure 4.1: Family of Solutions for y=cos(t). Only the function in blue satisfies the initial condition y(0)=1.

Some vocabulary to note:

  1. An Initial Condition (IC) for an ODE is a function value, y(t0), provided at a specific value of the independent variable, often denoted t0. The value, t0, does not need to equal zero. For example: let t0=3, then y(3)=2 would still be called an initial condition.

  2. The constant of integration, C, is determined by applying the initial condition to the ODE’s general solution. The result is a specific solution, i.e. a solution specific to the IC.

  3. When an ordinary differential equation (ODE) and initial condition (IC) are provided as a single problem, the combination is called an Initial Value Problem (IVP).

4.2.1 Example #3

Solve y=tln(t) and y(1)=2,assuming t>0. We begin by finding the general solution. Integrating both sides of the ODE (use integration by parts) gives

ydt=tln(t)dty(t)=t22ln(t)t24+C

Now that we have the general solution, we apply the initial condition to determine C. We have

y(1)=2=122ln(1)124+C2=14+CC=74

Substituting this value into the general solution gives us the specific solution to the IVP

y(t)=t22ln(t)t2474

Note: this solution satisfies both the ODE and the IC. This can be easily verified.

Check the ODE:

LHS:y(t)=tln(t)+t22(1t)t2=tln(t).RHS:tln(t).

Now we can check the IC by evaluating our function at t=1 and seeing if we get the desired value of 2. y(1)=122ln(1)12474=1474=2

Using a direct approach and the Fundamental Theorem of Calculus is often a good method for solving IVP's when the RHS of the differential equation is only a function of the independent variable, i.e. y=f(t). However, we cannot be assured of success because the function on the right-hand side may not be integrable.

For example we can try to solve this ODE

y=ett

We are stuck attempting to evaluate

ettdt

In these situations, we have other techniques to use. In the next few sections, we will address two approaches: Graphical Analysis and Numerical Approximation. These techniques are widely used and broadly applicable to differential equations.

The following are examples of how to solve IVPs using the Fundamental Theorem of Calculus.

4.2.2 Example #4

Find the general solution and then solve the IVP to find the specific solution:

u=2t  with  u(0)=2

Start by integrating both sides of the ODE

u(t)dt=2tdt

Applying the Fundamental Theorem of Calculus gives

u(t)=t2+C

Family of Solutions for ODE in Example 4. Only one of them will solve the IVP.

Figure 4.2: Family of Solutions for ODE in Example 4. Only one of them will solve the IVP.

The general solution is u(t)=t2+C.

Now apply the initial condition (IC) to the general solution and find the specific solution

u(0)=2=02+CC=2

The specific solution is u(t)=t22.

In the figure above we can see several solutions to the ODE. Our specific solution appears in black. Notice that the function in black passes through the point (t=0,u=2), which corresponds to the initial condition u(0)=2.

4.2.3 Example #5

Find the general solution and then solve the IVP to find the specific solution:

z=tet2  with  z(0)=1.

Integrate both sides of the ODE

z(t)dt=tet2dt

Applying u-substitution and the Fundamental Theorem of Calculus gives

z(t)=12et2+C. Below, we can see several members of the family of solutions to the ODE. Only one of them will solve the IVP.
Some solutions for ODE in Example 5. Only one of these will solve the IVP.

Figure 4.3: Some solutions for ODE in Example 5. Only one of these will solve the IVP.

Apply the initial condition (IC) to the general solution and find the specific solution

1=z(0)=12e02+CC=12.

The specific solution is z(t)=12et2+12.

Again, we plot several solutions of the ODE above. Our specific solution to the IVP appears in black. Note that it passes through the point (t=0,z=1), which corresponds to the initial condition z(0)=1.

4.2.4 Example #6

Find the general solution and then solve the IVP to find the specific solution:

w=tcos(t)  with  w(π)=3.

Integrate both sides of the ODE

w(t)dt=tcos(t) dt Applying integration by parts and the Fundamental Theorem of Calculus gives

w(t)=tsin(t)+cos(t)+C Several members of the family of solutions are shown below. Only one of them will solve the IVP.
Many solutions to the ODE in Example 6.  Only one of these functions will solve the IVP.

Figure 4.4: Many solutions to the ODE in Example 6. Only one of these functions will solve the IVP.

Now apply the initial condition (IC) to the general solution and find the specific solution

w(π)=3=πsin(π)+cos(π)+CC=4

The specific solution is w(t)=tsin(t)+cos(t)+4.

The specific solution to the IVP appears in black in hte figure above. Note that it passes through the point (t=π,w=3), which corresponds to the initial condition w(π)=3.

4.3 Exercises

Solve the following IVPs. Provide the general solution, the specific solution for the initial condition, and a plot of the specific solution on a representative domain. Use plotFun to plot your solutions.

# ODE Initial Condition
1 y=3 y(0)=2
2 u=3t24t+1 u(0)=5
3 w=3sin(t) w(0)=2
4 z=et z(0)=4
5 w=ln(t) w(1)=0
6 u=tsin(t) u(π)=0
7 y=1t y(1)=2
8 z=t et2+1 z(0)=1
9 y=sin(t)+cos(t) y(0)=1
10 u=1 u(3)=0
11 y=et+1 y(0)=2
12 u=2t+1 u(0)=3
13 w=3cos(3t) w(π)=1
14 z=e3t z(0)=2
15 w=ln(5t) w(1)=1
16 u=2t u(1)=0