Skip to content

Latest commit

 

History

History
116 lines (107 loc) · 3.75 KB

Assignment-2-ODEs-Analytical-solution.md

File metadata and controls

116 lines (107 loc) · 3.75 KB

Assigment 2. ODEs. Analytical solution

Part A. Find the ODE type and solve it:

1) Evaluate:

$$ x\frac{\mathrm{d}x}{\mathrm{d}x} = 1 - t \text{ | Separable ODE} \\ xdx = dt - tdt \\ \int xdx = \int dt - \int tdt \\ \frac{x^2}{2}=t - \frac{t^2}{2}+c \\ x^2 = 2t - t^2 + c, c \in \R \\ x= \pm \sqrt{-t^2 + 2t} $$

2) Evaluate:

$$ y' - y = 2x - 3 \text{ | First-order non-homogeneous linear ODE} \ $$ Assume $2x-3 = 0$

$$ y' - y = = 0 \\ \frac{dy}{y}=dx \\ \ln{y}= x + C, y = Ce^x, x = \varphi(x) \\ y'=(\varphi(x)e^x)' \Rightarrow y'=(\varphi(x)e^x)' - \varphi(x)e^x = 2x - 3 \\ \varphi'(x)e^x + \varphi(x)e^x - \varphi(x)e^x = 2x-3 \\ \varphi'(x)e^x = 2x - 3 \to \varphi(x) = \int\frac{2x-3}{e^x}dx \\ |t=2x-3,dt=2dx,dz=e^{-y},z=-e^{-x}| \\ \int udv = uv - \int vdu \\ \int (2x-3)e^{-x}dx=(3-2x)e^{-x}+2\int e^{-x}dx = (3-2x)e^{-x}-2e^{-x}+c = \varphi(x) \\ y = \varphi(x)e^x=((3-2x)e^{-x}-2e^{-x}+c)e^{x}) \\ y = 1 - 2x + Ce^x $$

3) Evaluate:

$$ y^2 + x^2y' = xyy'\text{ | First-order homogeneous linear ODE} \\ |y=tx, dy = xdt+tdx| \\ t^2x^2+x^2\frac{dy}{dx}=x^2t\frac{dy}{dx} \\ t^2x^2+x^2\frac{xdt+tdx}{dx}=x^2t\frac{xdt+tdx}{dx} \\ t^2x^2dx+x^3dt+x^2tdt=x^3tdt+x^2t^2dx \\ x^3dt+x^2tdx=x^3tdt \\ \frac{dx}{x}=dt - \frac{dt}{t}, \\ \ln|x|, t-\ln|t|+C,|t =\frac{y}{x}| \\ ln|x|=\frac{y}{x}- ln|\frac{y}{x}|+C \\ ln|x\frac{y}{x}|=\frac{y}{x}+C\\\ y = Ce^{\frac{y}{x}} $$

4) Evaluate:

$$ \underbrace{(2 - 9xy^2)x}{F'x} dx + \underbrace{(4y^2 - 6x^3)y}{F'y} dy = 0 \text{ | ODE in exact differentials} \ F'x= (2 - 9xy^2)x \ \frac{\partial}{\partial y} = [((2 - 9xy^2)x]'_y = |u'v+uv'| = (2-9xy^2)'_yx+(2-9xy^2)x'_y= -18x^2y\ F'y= (4y^2 - 6x^3)y \ \frac{\partial}{\partial x} =[(4y^2 - 6x^3)y]'_x=(4y^2-6x^3)'_xy=-18x^2y \ F'x= F'y \ F = \int (2-9xy^2)xdx=2 \int xdx -9y^2 \int x^2dx= \ = x^2 -3y^2x^3+z(y) \ (x^2 -3y^2x^3+z(y))' =F'_y= 4y^3-6x^3y \ z(y)'=4y^3 \ z(y)=5 \int y^3dy =y^4+c \ x^2-3x^3y^2+y^4=C $$

5) Evaluate:

$$ (2x + 1)y' = 4x + 2y\text{ | First-order linear ODE}\\ (2x+1)y'-2y=0 \\ dy=2y\frac{dx}{2x+1}\\ \frac{1}{2}\ln|y|=\frac{1}{2}\ln|2x+1|+\varphi(x)\\ |e^{\ln\beta}= \beta| \Rightarrow e^{\ln|y|} = e^{\ln \varphi(x)(2x+1)} \\ y = \varphi(x)(2x+1) \\ (2x + 1)y' = 4x+ 2\varphi(x)(2x+1)\\ y'= \varphi'(x)(2x+1)+\varphi(x) = \varphi'(x)(2x+1)+\varphi(x)*2\\ (2x+1)( \varphi'(x)(2x+1)+\varphi(x)*2) = 4x+2\varphi(x)(2x+1)\\ \varphi'(x)(2x+1)^2+2\varphi(x)(2x+1)=4x+2\varphi(x)(2x+1)\\ \varphi'(x) = \frac{4x}{2x+1}^2, \varphi(x) = \ln|2x+1|+\frac{1}{2x+1}+C\\ y=\ln|2x+1|(2x+1)+1+C $$

Part B

1. A population of protozoa develops with a constant relative growth rate of 0.7 per member per day. Initially, the population consist of two members. Find the population size after six days.

$$ N : \text{ population of protozoa}\\ Stock : 0,7N \text{per day}\\ Flow : 0 N(0)= 2, N(6)= ?\\ \frac{dN}{dt}=|Stock-Flow|=0,7N e^{\ln|N|}= e^{0,7N+C} \\ N=Ce^{0,7t} $$

2. Consider an insect population whose size P is measured as biomass (mass of the population members) in kilograms. The population is increasing by 30% per year. However, the population is also controlled by a natural predator population that destroys 6 kg of insects per year.

$$ P: \text{ biomass in kg}\\ Stock: 0,3P \text{ per year}\\ Flow: 6kg \text{ per year}\\ $$

  • (a) Find the model describing the population size P at any given time t; $$ \frac{dP}{dt}= 0,3P-6 \text{ | Non homogeneous ODE} \ \ln|P|=0,3t+C,\Rightarrow P=Ce^{0,3t}\ \frac{dP}{dt}=P'=0,3P-6\ \varphi'(t)e^{0,3t}+0,3\varphi(t)e^{0,3t} =0,3\varphi(t)e^{0,3t}-6\ \varphi'(t) = -6e^{-0,3t}\ \varphi(t)=20e^{-0,3t}+C \ P=(20e^{-0,3t}+C)e^{0,3t}=20+Ce^{0,3t} $$
  • (b) Find the population size 4 years after if the initial biomass is 15 kg. $$ P(4)=?, P(0)=15kg\ P(0)=20+Ce^{0,30} = 15, C=-5\ P(0)=20+(-5)e^{0,34} \approx 3,46 $$