MATH201/content/Bernoulli equations (lec 3).md

61 lines
3.0 KiB
Markdown
Raw Normal View History

2023-09-27 10:58:42 -06:00
# Bernoulli's equation:
### $$\frac{ dy }{ dx } +P(x)y=Q(x)y^n \quad\quad n\in\mathbb{R},\quad n\ne0,1$$
>I'm calling this #de_b_type1. This is in standard form btw.
2023-11-01 14:25:42 -06:00
It looks almost like a linear equation! In fact if $n=0$ it is by definition. We will see further that if $n=1$ you get a separable equation. So we ignore the cases when $n=0,1$ as these can be solved with prior tools.
2023-09-27 10:58:42 -06:00
Bernoulli's equations are important as you will see it in biology and in engineering.
2023-11-01 14:25:42 -06:00
If $y$ is $+$ then $y(x)=0$ is a solution to the equation:
2023-09-27 10:58:42 -06:00
$\frac{dy}{dx}+0=0\quad\Rightarrow \quad0=0$
Let's move the y to the LHS:
$y^{-n}\frac{ dy }{ dx }+P(x)y^{1-n}=Q(x)$
2023-11-01 14:25:42 -06:00
notice that $y(x)=0$ is no longer a solution! It was lost due to dividing by zero. So from here on out we will have to remember to add it back in our final answers.
2023-09-27 10:58:42 -06:00
let $y^{1-n}=u$
Differentiating this with respect to x gives us:
$(1-n)y^{-n}\frac{ dy }{ dx }=\frac{du}{dx}$
$y^{-n}\frac{ dy }{ dx }=\frac{ du }{ dx }{\frac{1}{1-n}}$
substituting in we get:
$y^{-n}\frac{ dy }{ dx }+P(x)u=Q(x)=\frac{ du }{ dx }{\frac{1}{1-n}+P(x)u}$
and we get a linear equation again: (Handy formula if you wanna solve Bernoulli equations quick. Just remember that once you find $u(x)$, substitute it back for $y(x)^{1-n}=u(x)$ to get your solution for y.)
$$\frac{1}{1-n}\frac{ du }{ dx }+P(x)u=Q(x)\quad \Box$$
2023-09-27 10:58:42 -06:00
>Remember when I said that when n=1 the equation becomes a separable equation?:
>$y^{-n}\frac{ dy }{ dx }+P(x)y^{1-n}=Q(x)$
>let $n=1$
>$y^{-1}\frac{ dy }{ dx }+P(x)=Q(x)$
>$y^{-1}dy=dx(Q(x)-P(x))$ <-This is indeed a separable equation #de_s_type1
---
# Examples of Bernoulli's equation:
#ex #de_b_type1 Find the general solution to:
$y'+y=(xy)^2$
Looks like a Bernoulli equation because when we distribute the $^2$ we get $x^2y^2$ on the RHS. This also tells us that n=2
$y'+y=x^2y^2$
$y'y^{-2}+y^{-1}=x^2$
>Note that we lost the y(x)=0 solution here, we will have to add it back in the end.
let $u=y^{1-n}=y^{-1}$
2023-11-01 14:25:42 -06:00
Differentiating wrt. $x$ we get: $\frac{du}{dx}=-y^{-2}{\frac{dy}{dx}}$
2023-09-27 10:58:42 -06:00
$y^{-2}{\frac{dy}{dx}=-\frac{ du }{ dx }}$
$y^{-2}{\frac{dy}{dx}+y^{-1}=-\frac{ du }{ dx }}+y^{-1}$
${x^2=-\frac{ du }{ dx }}+y^{-1}$
$x^2=-\frac{du}{dx}+u$
$\frac{du}{dx}-u=-x^2$
Yay we have a linear equation now! We can solve it using the techniques & formulas we learned for them.
let $P(x)=-1 \quad Q(x)=-x^2 \qquad I(x)=e^{\int -1 \, dx}=e^{-x}$
$u=-e^{x}\int e^{-x}x^2 \, dx$
How to integrate this? You can use integration by parts:
LIATE: log, inv trig, alg, trig, exp
$\int fg' \, dx=fg-\int f'g \, dx$
let $f=x^2 \qquad f'=2x \qquad g'=e^{-x} \qquad g=-e^{-x}$
$u=-e^{x}\left( x^2(-e^{-x})-\int 2x(-e^{-x}) \, dx \right)$
$u=-e^{x}\left( -x^2e^{-x}+2\int xe^{-x} \, dx \right)$
let $f=x \qquad f'=1 \qquad g'=e^{-x} \qquad g=-e^{-x}$
$u=-e^x\left( -x^2e^{-x}+2\left( -xe^{-x}-\int -e^{-x} \, dx \right) \right)$
$\frac{1}{y}=-e^x\left( -x^2e^{-x}+2\left( -xe^{-x}-e^{-x} +C\right) \right)$
$\frac{1}{y}=x^2+2(x+1+Ce^x)$
$\frac{1}{y}=x^2+2x+2+Ce^x$
The general solution to the DE is:
$$y(x)=\frac{1}{x^2+2x+2+Ce^x} \quad\text{as well as}\quad y(x)=0$$
---
#end of lecture 3