User:Egm6321.f12.team06.gu/report5

==Problem 5.11: Numerical Solution for Implicit Integration ==

Problem Statement

 * Consider the following integral


 * Let $$ n=3, a=2, b=10 $$
 * a) For each value of time $$ t $$, solve for altitude $$ z(t) $$, then plot $$ z(t) $$ versus $$ t $$.
 * b) Find the time when the projectile returns to the ground.

Given

 * $$ n=3, a=2, b=10 $$
 * $$ z(0)=0, t(0)=0 $$

Nomenclature

 * $$ F^{-1}(\cdot) $$: Inverse function
 * Hypergeometric Function: $$ F(a,b;c;x):= \sum_{k=0}^{\infty}\frac{(a)_k(b)_k}{(c)_k}\frac{x^k}{k!}$$

Part a) Solve for z(t)

 * Eq(11.1) is re-written as


 * Solving the indefinite integral for the left hand side in eq(11.2) is not easy, therefore invoke Wolfram Alpha to solve for the symbolic expression in terms of $$z$$


 * Typically, by typing "Integrate dz/(a z^n+b)" in Wolfram Alpha, one will get the first integral of eq(11.1) in the form of hypergeometric function


 * Substituting a,n,b with 2,3,10 into eq(11.3) yields


 * Which is the first integral for the left hand side of eq(11.2)


 * To verify the correctness of eq(11.4), type "integrate dz/(2 z^3+10)" in Wolfram Alpha, which gives the following expression


 * It turns out that eq(11.5) has the same plot of eq(11.4) in Wolfram Alpha, thus both solutions are correct.


 * According to eq(11.2), we have


 * To solve for $$z(t) $$, one just need to find $$z(t)= f^{-1}(-t)$$. Again, solving for the inverse function is not easy since it cannot be written explicitly. Therefore it is impossible for us to analytically solve for $$z(t)$$. One possible solution to get $$z(t) $$ is to numerically evaluate its value for each value of time t. Invoke Matlab and type:


 * {| style="width:100%" border="0" align="left"


 * style="width:30%; padding:10px; border:1px solid #888888" align="left" |
 * style="width:30%; padding:10px; border:1px solid #888888" align="left" |
 * }
 * Figure derived from Matlab
 * }
 * Figure derived from Matlab



Part b) Find t

 * For a projectile model, we were expecting to get a parabolic curve, however it turns out that we only derive the above figure that doesn't seem to have the correct physical meaning.
 * From the above figure, one can easily find $$x=0.2299$$ when $$y$$ goes to zero.
 * And since $$z(t)$$ becomes zero when the projectile returns to ground, we can conclude that
 * {| style="width:100%" border="0"|-


 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * $$t=0.2299$$


 * }

Problem Statement

 * For L2-ODE-VC


 * a) Verify its exactness
 * b) Show if it is in the power form of eq(3) p21-1 in the lecture notes
 * c) Verify that :$$ F(a,b;c;x)$$ is indeed a solution of eq(12.1)

Given

 * Power form for L2-ODE-VC:

Nomenclature

 * L2-ODE-VC: Linear 2nd Order ODE with varying coefficients
 * $$ F(a,b;c;x)$$: Hypergeometric Function
 * $$ \displaystyle p=y'=\frac{dy}{dx}$$
 * $$ \displaystyle y''=\frac{d^2y}{dx^2}$$
 * $$ \displaystyle \phi_x(x,y,p) =\frac{\partial\phi(x,y,p)}{\partial x}, \phi_y(x,y,p) =\frac{\partial \phi(x,y,p)}{\partial y} $$
 * $$ \displaystyle f_{xx}=\frac{\partial^2 f(x,y,p)}{\partial x^2}, f_{xy}=\frac{\partial^2 f(x,y,p)}{\partial x \partial y}, f_{xp}=\frac{\partial^2 f(x,y,p)}{\partial x \partial p} $$
 * $$ \displaystyle f_y=\frac{\partial f(x,y,p)}{\partial y}, f_{yy}=\frac{\partial^2 f(x,y,p)}{\partial y^2}, f_{yp}=\frac{\partial^2 f(x,y,p)}{\partial y \partial p} $$
 * $$ \displaystyle g_y=\frac{\partial g(x,y,p)}{\partial y}, g_{xp}=\frac{\partial^2 g(x,y,p)}{\partial x \partial p}, g_{yp}=\frac{\partial^2 g(x,y,p)}{\partial y \partial p}, g_{pp}=\frac{\partial^2 g(x,y,p)}{\partial p^2} $$

Part a) Verify Exactness

 * Re-write equation (12.1):


 * It follows that


 * Thus equation(12.1) satisfies the 1st exactness condition


 * To verify the second exactness condition, one just need to show that if equation (12.1) satisfies the following equations:


 * Calculate partial derivatives from equation (12.5) and (12.6)
 * $$ f_{xx}=-2$$
 * $$ f_{xy}=f_{yy}=g_{yp}=0$$
 * $$ g_{xp}=-(a+b+1)$$
 * $$ g_{y}=-ab$$
 * $$ f_{xp}=f_{yp}=f_{y}=g_{pp}=0$$


 * Bring them into equation (12.7) and (12.8), we have
 * $$ f_{xx}+2p\,f_{xy}+p^2\,f_{yy}=-2+0+0=-2 $$
 * $$ g_{xp}+p\,g_{yp}-g_y=-(a+b+1)+0-(-ab)=ab-(a+b+1) $$
 * Thus only when $$ a,b $$ are chosen such that $$ab-(a+b+1)=-2$$, then equation (12.7) is satisfied
 * $$ f_{xp}+p\,f_{yp}+2\,f_{y}=0+0+0=0 $$
 * $$ g_{pp}=0 $$
 * Thus equation (12.8) is satisfied


 * {| style="width:100%" border="0"|-


 * style="width:92%; padding:10px; border:2px solid #8888aa" |


 * Therefore, only when $$ a,b $$ are chosen such that $$ab-(a+b+1)=-2$$, both the first and second exactness conditions are satisfied, and eq(12.1) is said to be exact. Otherwise, eq(12.1) is not exact.


 * }

Part b) Compare with Power Form

 * Compare terms in eq(12.1) with those of eq(12.2):
 * $$ \underbrace{x(1-x)\,y''}_{\displaystyle\color{blue}{part1}} +\underbrace{[c-(a+b+1)x]\,y'}_{\displaystyle\color{blue}{part2}} -\underbrace{ab\,y}_{\displaystyle\color{blue}{part3}}$$
 * $$ \underbrace{\alpha\,x^r y''}_{\displaystyle\color{blue}{part1}}+\underbrace{\beta\,x^s y'}_{\displaystyle\color{blue}{part2}} +\underbrace{\gamma\,x^t y }_{\displaystyle\color{blue}{part3}}$$
 * Part1: Since there are two terms containing $$x$$ in the first part of eq(12.1), while there is only one term containing $$x$$ in the first part of eq(12.2), part1 of eq(12.1) cannot be equal to that of eq(12.2)
 * Part2: If we choose $$\beta=-(a+b+1),s=1,c=0$$, then part2 of eq(12.1) has the same form as that of eq(12.2)
 * Part3: If we choose $$\gamma=-ab,t=0$$, then part3 of eq(12.1) has the same form as that of eq(12.2)


 * {| style="width:100%" border="0"|-


 * style="width:92%; padding:10px; border:2px solid #8888aa" |


 * In conclusion, since part1 in eq(12.1) cannot be written into the corresponding part of eq(12.2), we say that eq(12.1) is not in the power form of eq(12.2)


 * }

Part c) Verify Solution

 * Eq(12.3) is equivalent to


 * Taking the first derivative of y with respect to x yields


 * Taking the second derivative of y with respect to x yields


 * Expanding eq(12.1) gives


 * For the left hand side of eq(12.12), substituting $$ y'',y',y $$ with hypergeometric functions from eq(12.9)~ eq(12.11) yields


 * Which is equivalent to


 * In order for the polynomial in (12.14) to be equal to zero, we want the sum of coefficiets of $$ x^k $$ in all five terms to vanish.
 * In other words, one just need to prove that the sum of coefficients of $$ x^k $$ is always equal to zero for any value of integar $$ k $$, where $$ k \in [0,+\infty)$$
 * Note that term1, term4 do not appear until k=1, and term2 does not appear until k=2. Thus before analyzing the coefficients in general case, we need to analyze the special cases when k=0 and k=1 in the interest of completeness.

Case 1 $$ k=0 $$

 * Polynomial (12.14) goes to

Case 2 $$ k=1 $$

 * Polynomial (12.14) goes to

Case 3 $$ k\in [2,+\infty) $$

 * Polynomial (12.14) goes to


 * $$ x^k\,[\frac{(a)_{k+1}(b)_{k+1}}{(c)_{k+1}}\frac{1}{(k-1)!} - \frac{(a)_{k}(b)_{k}}{(c)_{k}}\frac{1}{(k-2)!} + c\,\frac{(a)_{k+1}(b)_{k+1}}{(c)_{k+1}}\frac{1}{k!} -(a+b+1)\,\frac{(a)_{k}(b)_{k}}{(c)_{k}}\frac{1}{(k-1)!}-ab\,\frac{(a)_{k}(b)_{k}}{(c)_{k}}\frac{1}{k!}]$$


 * $$ = x^k\,[\frac{(a+k)(b+k)}{(c+k)(k-1)}\,\frac{(a)_{k}(b)_{k}}{(c)_{k}}\frac{1}{(k-2)!} - \frac{(a)_{k}(b)_{k}}{(c)_{k}}\frac{1}{(k-2)!} + c\,\frac{(a+k)(b+k)}{(c+k)(k-1)k}\,\frac{(a)_{k}(b)_{k}}{(c)_{k}}\frac{1}{(k-2)!} $$
 * $$ - \frac{a+b+1}{k-1}\,\frac{(a)_{k}(b)_{k}}{(c)_{k}}\frac{1}{(k-2)!} - \frac{ab}{k(k-1)}\,\frac{(a)_{k}(b)_{k}}{(c)_{k}}\frac{1}{(k-2)!}]$$


 * $$ = x^k\,\frac{(a)_{k}(b)_{k}}{(c)_{k}}\frac{1}{(k-2)!}\,[\frac{(a+k)(b+k)}{(c+k)(k-1)} - 1 + c\,\frac{(a+k)(b+k)}{(c+k)(k-1)k} - \frac{a+b+1}{k-1} - \frac{ab}{k(k-1)}] $$


 * $$ = x^k\,\frac{(a)_{k}(b)_{k}}{(c)_{k}k(c+k)(k-1)}\frac{1}{(k-2)!}\,[(a+k)(b+k)k - (c+k)(k-1)k + c(a+k)(b+k) - (a+b+1)k(c+k)-ab(c+k)] $$


 * $$ = x^k\,\frac{(a)_{k}(b)_{k}}{(c)_{k}k(k-1)}\frac{1}{(k-2)!}\,[ab+ak+bk+k^2-k^2+k-ak-bk-k-ab] $$


 * $$ = x^k\,\frac{(a)_{k}(b)_{k}}{(c)_{k}k(k-1)}\frac{1}{(k-2)!}*0 $$


 * {| style="width:100%" border="0"|-


 * style="width:92%; padding:10px; border:2px solid #8888aa" |


 * In general, it has been shown that for each value of $$ k $$, polynomial(12.14) equals to zero, which means that eq(12.1) is satisfied when substituting hypergeometric functions into it. Therefore we can conclude that $$ F(a,b;c;x)$$ is indeed a solution of eq(12.1)


 * }