MATH201/content/Homogenous equations (lec 2...

135 lines
5.0 KiB
Markdown

#start of lecture 2
## Homogenous equations:
$$\frac{dy}{dt}=f\left( \frac{y}{t} \right)$$
>I'm calling this #de_h_type1
let $u=\frac{y}{t}$ $y=tu \quad \frac{dy}{dt}=u+t\frac{du}{dt}$
so $\frac{dy}{dt}=f(u)=u+t{\frac{du}{dt}}$
The homogenous equation has been converted into a separable DE!
$\frac{du}{dt}=\frac{f(u)-u}{t}$
$\frac{du}{f(u)-u}=\frac{dt}{t}$
## Another way you can write a homogenous equation:
$$\frac{dy}{dx}=G(ax+by)\quad \text{where a, b }\in \mathbb{R}$$
>I'm calling this #de_h_type2
Then, let $u=ax+by$
$\frac{du}{dx}=a+b{\frac{dy}{dx}}$
$\frac{dy}{dx}=\frac{1}{b}{\frac{du}{dx}}-\frac{a}{b}=G(u)$
Again, the homogenous equation has been converted to a separable DE!
$dx=\frac{du}{b{G(u)+\frac{a}{b}}}$
Just integrate both sides as usual and you're chilling.
## Examples of homogenous equations:
#ex #de_h_type1
$$\frac{dy}{dx}=\frac{{x+y}}{x-y} \quad x>y\quad\text{This condition is added so the denominator}\ne 0$$
but $\frac{{x+y}}{x-y}\ne f(\frac{y}{x})$... Or is it? How can this be written as a homogenous equation?
divide the top and bottom by x:
$\frac{dy}{dx}=\frac{{1+\frac{y}{x}}}{1-\frac{y}{x}}$
Yay! now it's a function of $\frac{y}{x}$
let $u=\frac{y}{x} \quad \frac{dy}{dx}=u+x{\frac{du}{dx}}$
$\frac{dy}{dx}=\frac{1+u}{1-u}=u+x{\frac{du}{dx}}$
$\frac{dx({f(u)-u})}{x}=du$
$\frac{dx}{x}=\frac{du}{{f(u)-u}}$
>That's odd, why is it not $\frac{du}{f(u)-u}=\frac{x}{dx}$? I got this by moving the top over.
(it's because you must move all multiplicative factors when using this technique of moving the top. Be careful!)
$\int\frac{dx}{x}=\int\frac{du}{{f(u)-u}}$
$\ln\mid x\mid=\int \frac{du}{\frac{{1+u}}{1-u}-u}$
$\ln\mid x\mid=\int \frac{du}{\frac{{1+u-u+u^2}}{1-u}}$
$\ln\mid x\mid=\int \frac{1-u}{{1+u^2}}du$
>let $1+u^2=v \quad dv=2udu$
$=\int \frac{{1-u}}{v} \, du$ Gah, doesn't work. I didn't notice I could split the integral up first.
$\ln\mid x\mid=\int \frac{1}{{1+u^2}}\,du-\int \frac{u}{1+u^2} \, du=\arctan\left( \frac{y}{x} \right)+C-I_{0}$
for $I_{0}$ let $v=1+u^2 \quad dv=2udu$
$I_{0}=\int \frac{u}{v} \, \frac{dv}{2u}=\frac{1}{2}\int \frac{dv}{v}=\frac{1}{2}\ln(1+u^2)$
> ^Note no abs value needed in the $\ln()$ as $1+u^2$ is always +
$\ln\mid x\mid=\arctan\left( \frac{y}{x} \right)+C-\frac{1}{2}\ln(1+u^2)$
$\ln\mid x\mid=\arctan\left( \frac{y}{x} \right)+C-\frac{1}{2}\ln\left( 1+\frac{y^2}{x^2} \right)$
$\mid x\mid=e^{\arctan(\frac{y}{x})+C-\ln(\sqrt{ 1+y^2/x^2 })}$
$x=\frac{e^{\arctan(y/x)}A}{\sqrt{ 1+\frac{y^2}{x^2} }}$
$x\sqrt{ 1+\frac{y^2}{x^2}} ={e^{\arctan(y/x)}A}$
So the final general solution to the problem is:
#### $$\sqrt{ x^2+y^2 }=e^{\arctan\left( \frac{y}{x} \right)}A$$
---
#ex #de_h_type2 $$(2x-2y-1)dx+(x-y+1)dy=0$$
Can we write it in the form $\frac{dy}{dx}=G(ax+by)$?
$(x-y+1)dy=-(2x-2y-1)dx$
$\frac{dy}{dx}=\frac{{2y+1-2x}}{x-y+1}$
factor out a -2?
$\frac{dy}{dx}=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$
Yep! looks like a #de_h_type2
let $u=x-y$
$\frac{du}{dx}=1-\frac{dy}{dx}$
$1-\frac{du}{dx}=\frac{dy}{dx}=-2\frac{{x-y-\frac{1}{2}}}{x-y+1}$
>Obviously we don't work with x and y as I was entailing above, substitute $u=x-y$ in you silly goose.
$1-\frac{du}{dx}=-2\frac{{u-\frac{1}{2}}}{u+1}$
$\frac{du}{dx}=2\frac{{u-\frac{1}{2}}}{u+1}+1$
$\frac{du}{dx}=\frac{2u-1}{u+1}+1$
$\frac{du}{dx}=\frac{{2u-1+u+1}}{u+1}$
$\frac{du}{dx}=\frac{3u}{u+1}$
$\frac{(u+1)du}{3u}=dx$
$\int \frac{(u+1)du}{3u}=\int dx$
>$\int \frac{du}{3}+\frac{1}{3}\int \frac{du}{u}=\ln\mid x\mid+C$
>Ah, I made a mistake. $\int dx \ne \ln\mid x\mid+C$
$\int \frac{du}{3}+\frac{1}{3}\int \frac{du}{u}=x+C$
> Okay, now that we have integrated, we can start talking in terms of x and y again
$\frac{x-y}{3}+\frac{1}{3}\ln\mid x-y\mid = x+C$
$x-y+\ln\mid x-y\mid=3x+C$
$\ln\mid x-y\mid=C+y+2x$ < this is where he moved the C to the left
$\mid x-y\mid=e^Ce^ye^{2x}$
$x-y=Ae^ye^{2x}$
$A(x-y)=e^{y+2x}$
> I know that above step looks illegal, but the prof did this (indirectly, he moved C to the LHS in a prior step without regarding it's sign). I wonder what happens if A was 0 though? Do we get divide by zero errors? Thinking about it more, we are changing $x-y=0$ to $e^{y+2x}=0$ when $A=0$ The first one has a solution (y=x) the second loses that solution because of ln(0) issues (gives a function that's undefined for all x). when checking y(x)=x in the DE, it is a valid solution. So perhaps it is an illegal step! Because we lost a valid solution. I'll have to check with the prof.
> Interestingly, if we act like $e^{y+2x}=0$ is defined, we get $\frac{dy}{dx}=-2$
>
>Proof:
>$\lim_{ n \to 0 }e^{y+2x}=n$
>$\lim_{ n \to 0 }\ln(n)=y+2x$
>$\lim_{ n \to 0 }\frac{d}{dx}\ln(n)=0=\frac{dy}{dx}+2$
>$\frac{dy}{dx}=-2\quad \Box$
>plugging into the equation $(2x-2y-1)dx+(x-y+1)dy=0$ yields:
>$1=\frac{2(x-y+1)}{2x-2y-1}$
>$2x-2y-1=2(x-y+1)$
>$-1=2$
>So what does this all mean? I think it means that even if we imagine that $\frac{dy}{dx}$ exists, the equation is not satisfied and $y=x$ is definitely not a solution even when we try to cheat a little.
We can rearrange to our liking, but we have found the general solution to the DE:
#### $$x-y=Ae^{2x+y}$$
---