Linear 1st-order ODEs
Contents
Linear 1st-order ODEs#
Integrating Factors - Recap#
\(\rightarrow\) Functions that make inexact \(1^\circ\) ODEs exact (can’t always find them).
\(\rightarrow\) Two possibilities in this class: \(F(x)\) or \(F(y)\)
if \(F(x)\), then
and \(F(x) = \exp[\int R(x)dx]\)
if \(F(y)\), then
and \(F(y) = \exp[\int R(y)dy]\)
\(\rightarrow\) Once you find your I.F., follow the steps for solving an exact equation:
Write in form \(M(x)dx + N(y)dy = 0\)
Check for exactness
If exact find \(u(x,y)\)
Find implicit general solution from \(u(x,y)=c\)
Linear \(1^\circ\) ODEs#
A \(1^\circ\) differential equation is linear if it can be written:
\(\rightarrow\) it is linear in \(y\) and \(y'\)
\(\rightarrow\) \(p\) and \(r\) may be any function of \(x\) only
Two cases to solve:
Homogeneous Linear ODE
Non-homogeneous Linear ODE
Homogeneous Case#
Non-Homogeneous Case#
Write in the form
Check for exactness:
Find an integrating factor. Try \(F(x,y)=F(x)\)
Once you recognize that you have a linear \(1^\circ\) ODE, you know that you can solve it as an exact equation using the I.F. \(F(x) = \exp\left( \int p(x)dx \right)\)
Therefore since we will always have the same I.F., let’s solve the non-homogeneous linear \(1^\circ\) ODE to obtain a general solution \(\implies\) won’t have to derive every time.
Note that the RHS is dependent only on x, so we can simply integrate
If homogeneous, then \(r=0\) and \(y(x) = ce^{-\int p dx}\) as we found before.
Example#
\(\frac{dy}{dx} = (x+1)^2 - y\)
\(\therefore\) we know we can solve by turning it into an exact equation using an I.F. of the form
Multiply our ODE by our I.F.:\
Or we could have found this from our fully generalized solution
Integrating by Parts (Refresher)#
Method to integrate product of 2 terms
Example#
Consider \(\int e^x (x+1)^2 dx\)
\(\rightarrow\) easiest to set
then,
Recap of linear \(1^\circ ODEs:\)#
Chain rule provides a simple solution:
Integral can be difficult to solve
Chemical Engineering Example#
Ethyl acetate decomposition
At steady state, each drop of feed is immediately converted to the composition of product stream.
What is concentration profile of A before steady state?
Mass balance on A:
\(\implies\) We can solve 2 ways:
Separate
Treat as linear equation
1. Separate#
Useful integral:
Take \(a=-\frac{F+kV}{V}\) and \(b=\frac{FC_0}{V}\)
Take the last term as \(\beta\):
Find \(\gamma\) with I.C. \(C(t=0) = C_0\) which is what the CSTR is charged with; doesn’t have to be equal to \(C_{in}\)
Check : Does \(C(0) = C_o\)? (yes)
Does \(C(t)\) as \(T\rightarrow \infty\) = \(\frac{F}{(F+kV)}C_{in}\)? (yes!)