First-order differential equations



Introduction
We consider the general first-order differential equation:


 * $$\tau \frac{dy(t)}{d t}  + y(t) = x(t)$$

The general solution is given by:


 * $$y(t) = y_0 e^{-(t-t_0)/\tau} + \frac{e^{-(t-t_0)/\tau}}{\tau} \int_{t_0}^{t} x(t') e^{(t'-t_0)/\tau} dt'$$

where $$y_0 = y(t = t_0)$$. Note that $$t'$$ is used to be distinguished from the upper limit $$t$$ of the integral.

To obtain the general solution, begin with the first order differential equation:


 * $$\tau \frac{dy(t)}{d t} + y(t) = x(t)$$

Divide both sides by $$\tau \,\!$$:


 * $$ \frac{dy(t)}{d t} + \frac{1}{\tau} y(t) = \frac{1}{\tau} x(t) $$

Rewrite the LHS in condensed form using the integrating factor $$ e^{{-t}/{\tau}} $$:


 * $$ e^{-t/\tau} \frac{d}{dt}\left[ {e^{t/\tau} y(t)} \right] = \frac{1}{\tau} x(t) $$

Notice how a chain differentiation will return the LHS to the previous form

Simplify:


 * $$ \frac{d}{dt} \left[ {e^{t/\tau} y(t)} \right]= \frac{1}{\tau} x(t) e^{t/\tau} $$

Integrate both sides:


 * $$ e^{t/\tau}y(t)-e^{t_0/\tau}y(t_0)= \frac{1}{\tau} \int_{t_0}^{t} x(t') e^{t'/\tau} dt' $$

Solve for $$ y(t) $$:


 * $$y(t) = y_0 e^{-(t-t_0)/\tau} + \frac{e^{-t/\tau}}{\tau} \int_{t_0}^{t} x(t') e^{t'/\tau} dt'$$

Example Solutions of First Order Differential Equations
Consider:

$$\frac{dy(t)}{d t}= x(t) $$

Multiplying both sides by $$dt$$ gives:

$$\int_{t_0}^{t}\frac{dy dt}{dt}=\int_{t_0}^{t} {x(t')dt'}$$

The general solution is given as:

$$ y(t)=y_0+\int_{t_0}^{t} {x(t')dt'} $$

Now Consider:

$$\frac{dy(t)}{dt}=-ay(t)$$

Dividing both sides by $$y(t)$$ gives:

$$\frac{1}{y(t)}\frac{dy(t)}{dt}=-a$$

which can be rewritten as:

$$\frac{d}{dt}{[ln(y(t))]}=-a$$

Multiplying both sides by $$dt$$, integrating, and setting both sides of the equation as exponents to the exponential function gives the general solution:

$$y(t)=y_{0}e^{-a(t-t_{0})}$$

Now Consider:

$$\frac{dy(t)}{dt}=-ay(t)+x(t)$$

The detailed solution steps are as follows:

1. Separate y(t) and x(t) terms

$$\frac{dy(t)}{dt}+ay(t)=x(t)$$

2. Rewrite the LHS in condensed form using the "integrating factor" $$e^{-at}$$

$$e^{-at}\frac{d(e^{at}y(t))}{dt}=x(t)$$

Notice how a chain differentiation will return the LHS to the form written in step 1

3. Divide both sides by $$e^{-at}$$

$$\frac{d(e^{at}y(t))}{dt}=e^{at}x(t)$$

4. Multiply both sides by $${dt}$$ and integrate

$$e^{at}y(t)-e^{at_0}y_0=\int_{t_0}^{t} x(t') e^{at'}dt' $$

The general solution is given as:

$$y(t)=y_{0}e^{-a(t-t_{0})}+e^{-at} \int_{t_0}^{t} x(t') e^{a(t'-t_{0})}dt' $$

Step Function Simplification
$$\tau \frac{dy(t)}{d t}  + y(t) = x(t)$$

For $$x(t) = \Theta(t-t_0) \,\!$$, which is the step function and $$y_0 = 0 \,\!$$

That is, $$x(t) = 1 \,\!$$ for $$t > t_0 \,\!$$ and $$ x(t) = 0 \,\!$$ otherwise:

The previously derived general solution:

$$y(t) = y_0 e^{-(t-t_0)/\tau} + \frac{e^{-(t-t_0)/\tau}}{\tau} \int_{t_0}^{t} x(t') e^{(t'-t_0)/\tau} dt'$$

reduces to:

$$y(t) = e^{-(t-t_0)/\tau}$$, since the integral equals 1.

The quantity $$\tau \,\!$$ can be seen to be the time constant whereby $$y(t) \,\!$$ drops to $$1/e \,\!$$ of its original value

Sample Problem
Problem Statement:

Consider the differential equation $$\frac{dy(t)}{d t} = -0.5 y(t)+ x(t)$$

where $$x(t)= 2+ 0.01 t \,\!$$

Assuming $$y_0 = 0 \,\!$$, what is the behavior of $$y(t)\,\!$$?

Solution:

General solution was derived previously as:

$$y(t)=y_{0}e^{-a(t-t_{0})}+e^{-at} \int_{t_0}^{t} x(t') e^{a(t'-t_{0})}dt' $$

For $$a = 0.5 \,\!$$ and $$y_0 = 0 \,\!$$, while setting $$t_0 = 0 \,\!$$, the solution reduces to:

$$y(t)= e^{-0.5t} \int_{0}^{t} (2 + 0.01 t') e^{0.5(t')}dt' $$

The following link may be referred to for integral tables: S.O.S. Math

Simplifying the solution gives the following:

$$y(t)= \frac{(e^{-0.5t})((x + 198)(e^{0.5t}) - 198))}{50}\,\!$$

Plotting this function displays the following behavior:



As can be seen clearly from the graph, initially the systemic response shows more exponential characteristics. However, as time progresses, linear behavior dominates.