Solution by Quadrature

When there is only one equation, even if it is nonlinear, it may be possible to solve by quadrature. For

the problem can be separated

and integrated.

If the quadrature can be performed analytically then the exact solution has been found.

For example, consider the kinetics problem with a second-order reaction.

To find the concentration versus time we can separate and integrate.

Application of the initial conditions gives the final solution.

This can be done in some versions of MATLAB, too. The following commands do the integration.

»f = '1/(c*c)'

f =1/(c*c)

»int(f,'c')

ans =-1/c

»f = 'k'

f = k

»int(f,'t')

ans = k*t

Combine these answers to get

For other ordinary differential equations an integrating factor is useful. Consider the problem governing a stirred tank with fluid entering with concentration cin and flow rate F, as shown in the figure. The flow rate out is also F and the volume of the tank is V. If the tank is completely mixed the concentration in the tank is c and the concentration of the fluid going out the tank is also c. The differential equation is then

Figure. Stirred Tank

Upon rearrangement we get

We use an integrating factor to solve this equation. The integrating factor is a function which can be used to turn the left-hand side into an exact differential and can be found using Fréchet differentials [Finlayson, 1972]. In this case

Thus the differential equation can be written as

This can be integrated once to give

or

If the integral on the right-hand side can be calculated then the solution can be obtained analytically. If not, then the numerical methods described below can be used. Laplace transforms can also be attempted.

Take Home Message: It is so useful to have an analytic solution that quadrature and an integrating factor should be tried before resorting to numerical solution.