# R4.1 Direct Derivation of Alternate Version of RTT

## Given

Another version of the Reynolds Transport Theorem:

 $\frac{D}{Dt}\int_{\mathcal B_t}f(x,t)\,d\mathcal B_t=\int_{\mathcal B_t}\frac{\partial f}{\partial t}\,d\mathcal B_t+\int_{\partial\mathcal B_t}\mathbf n\cdot(f\mathbf u)\,d(\partial\mathcal B_t)$ $\displaystyle (Equation\;4.1.1)$

## Find[1]

Provide a different and direct derivation of Equation 4.1.1.

## Solution

 Solved on our own

Solution is adapted from Malvern[2]. If $\displaystyle f(x,t)$ denotes any property of the material volume $\displaystyle\mathcal B_t$, for a spatial volume bounded by a control surface $\displaystyle\partial\mathcal B_t$, the following is true:

$\begin{bmatrix} \rm Total\,rate\,of\,change\,of\\ \rm{an\,arbitrary\,function} \\ f(x,t)\,\rm in\,region\,\mathcal B_t \end{bmatrix}=\begin{bmatrix} \rm Time\,rate\,of\,change\\ \rm of\,\mathit f(x,t)\,\rm within\,\mathcal B_t\\ \end{bmatrix}+\begin{bmatrix} \rm Flux\,of\,\mathit{f(x,t)}\\ \rm thru\,surface\,\partial\mathcal B_t \end{bmatrix}$

Now expressing mathematically what is stated above:

 $\frac{D}{Dt}\int_{\mathcal B_t}f(x,t)\,d\mathcal B_t=\int_{\mathcal B_t}\frac{\partial}{\partial t}f(x,t)\,d\mathcal B_t+\int_{\partial\mathcal B_t}f(x,t)\mathbf n\cdot \mathbf u \,d(\partial\mathcal B_t)$

# R*4.2 Exactness Verification

## Given

Non-exact L2-ODE-VC

Example: Consider the following ODE:

$\sqrt{x} \, y'' + 2 x y' +3y=0$

$\displaystyle (Equation\;4.2.1)$

## Find

Verify the exactness of Equation 4.2.1

## Solution

 Solved on our own

Mtg 21 (c,x)

To be exact, the equation 4.2.1 must satisfy two conditions.

1st Condition of Exactness

Fist, the equation must be presented in the following format

$\displaystyle F(x,y,y',y'')=g(x,y,y')+f(x,y,y')y''$

$\displaystyle (Equation\;4.2.2)$

By letting y'=p, the first condition of exactness is satisfied as shown in the following equation:

$\displaystyle F(x,y,p,y'')=\underbrace{2xp+3y}_{g(x,y,p)}+\underbrace{\sqrt{x}}_{f(x,y,p)}y''$

$\displaystyle (Equation\;4.2.3)$

2nd Condition of Exactness

In order to meet the second condition of exactness, the following equations must be satisfied:

$\displaystyle f_{xx}+2pf_{xy}+p^2f_{yy}=g_{xp}+pg_{yp}-g_y$

$\displaystyle (Equation\;4.2.4)$

$\displaystyle f_{xp}+pf_{yp}+2f_y=g_{pp}$

$\displaystyle (Equation\;4.2.5)$

Each element of equationgs 4.2.4 and 4.2.5 are calculated to be the following:

$\displaystyle f_{xx}=-\frac{1}{4}x^{-\frac{3}{2}}$

$\displaystyle f_y=f_{xy}=f_{yy}=f_{xp}=f_{yp}=0$

$\displaystyle g_{xp}=g_{pp}=2$

$\displaystyle g_y=3$

$\displaystyle g_{yp}=0$

Plugging each relevant element into equation 4.2.4 yields the following:

$\displaystyle -\frac{1}{4}x^{-\frac{3}{2}}+2p \cdot 0+ p^2 \cdot 0 \neq 2+ p\cdot 0 -3$

Plugging each relevant element into equation 4.2.5 yields the following:

$\displaystyle 0+p\cdot 0+2 \cdot 0 \neq 2$

Equations 4.2.4 and 4.2.5 have not been satisfied, therefore proved equation 4.2.1 is not exact.

# Problem R*4.3: Find $\displaystyle m$ and $\displaystyle n$ of the integrating factor $\displaystyle H(x,y) = x^{m}y^{n}$ such that the given N2-ODE is exact then solve for $\displaystyle y(x)$.

## Given

A function is given by

$\displaystyle x^{m}y^{n} \lbrack \sqrt{x}y''+2xy'+3y \rbrack = 0$

$\displaystyle (1) p.21-3$

Per Lecture notes: Mtg 21 (c) where

$\displaystyle h(x,y) = x^{m}y^{n}$

$\displaystyle (4.3.1)$

## Find

Part A: Find $\displaystyle (m,n)$ such that $\displaystyle (1) p.21-3$ is exact.

Part B: Show that the first integral is a L1-ODE-VC and solve

$\displaystyle \phi(x,y,p) = xp+(2x^{\frac{3}{2}}-1)y = k$

$\displaystyle (2)p.21-3$

for $\displaystyle y(x)$.

## Solution

 Solved on our own

Part A:

The first exactness criteria for second order non-liner ODE is

$\displaystyle F(x,y,p) = f(x,y,p)y'' + g(x,y,p)$

$\displaystyle (2) p.16-4$

where

$\displaystyle p = y'$

Comparing (1) p.21-3 with the form of (2) p.16-4, the functions $\displaystyle f$ and $\displaystyle g$ can be defined as

$\displaystyle f(x,y,p)=x^{0.5+m}y^{n}$

$\displaystyle (4.3.2)$

$\displaystyle g(x,y,p)=2x^{m+1}y^{n}p+3x^{m}y^{n+1}$

$\displaystyle (4.3.3)$

So the form of the 1st exactness condition is met.

For a second order non-liner ODE, the first part of the second exactness condition is

$\displaystyle f_{xx} + 2pf_{xy} + p^2f_{yy} = g_{xp} + pg_{yp} - g_{y}$

$\displaystyle (1) p.16-5$

For a second order non-liner ODE, the second part of the second exactness condition is

$\displaystyle f_{xp} + pf_{yp} + 2f_{y} = g_{pp}$

$\displaystyle (2) p.16-5$

Using the second part of the second exactness condition given above in $\displaystyle (2) p.16-5$ and recognizing the given$\displaystyle f(x,y,p)$ from equation $\displaystyle (4.3.2)$ is not a function of $\displaystyle p$, so the first two terms are zero. Additionally $\displaystyle g_p$ is constant wrt. $\displaystyle p$ and therefore $\displaystyle g_{pp}$ is zero. $\displaystyle (2) p.16-5$ can be simplified as shown below

$\displaystyle 2f_y=g_{pp}=0$

$\displaystyle (4.3.4)$

Taking the derivative .wrt $\displaystyle y$ of $\displaystyle f(x,y,p) = f_y$ in equation $\displaystyle (4.3.2)$ and substituting into $\displaystyle (4.3.4)$ yields

$\displaystyle 2\left[x^{0.5+m}ny^{n-1}\right]=0$

$\displaystyle (4.3.5)$

In order for equation $\displaystyle (4.3.5)$ to be true $\displaystyle m=0$

$\displaystyle n=0$

$\displaystyle (4.3.6)$

For clarity we can now re-write equations $\displaystyle (4.3.2)$$\displaystyle (4.3.3)$ with $\displaystyle n=0$ as shown below:

$\displaystyle f=x^{0.5+m}$

$\displaystyle (4.3.7)$

$\displaystyle g=2x^{m+1}p+3x^{m}y$

$\displaystyle (4.3.8)$

Next, use the first part of the the second exactness condition given in equation $\displaystyle (1) p.16-5$ with the following derivatives of $\displaystyle f$ and $\displaystyle g$ plugged in.

$\displaystyle {f_{xx} = (m+0.5)(m-0.5)x^{-1.5+n}}$
$\displaystyle{f_{xy} = 0}$
$\displaystyle{f_{yy} = 0}$
$\displaystyle{g_{xp} = 2(m+1)x^{m}}$
$\displaystyle{g_{yp} = 0}$
$\displaystyle{g_y=3x^{m}}$

Which yeilds:

$\displaystyle(m+0.5)(m-0.5)x^{-1.5+m} = 2(m+1)x^{m}-3x^{m}$

$\displaystyle (4.3.9)$

Solving this equation for $\displaystyle m$ yields

$\displaystyle m = \frac{1}{2}$

$\displaystyle (4.3.10)$

So the integrating factor to make $\displaystyle (1) p.21-3$ exact is

$\displaystyle h(x,y) = x^{0.5}$

$\displaystyle (4.3.11)$

Part B:

So using the integrating factor found above and multiplying through to equation $\displaystyle (1) p.21-3$ to get and exact N2-ODE one can use equation $\displaystyle (3) p.16-5$ to obtain the first integral given in $\displaystyle (2)p.21-3$

Rearranging equation $\displaystyle (2)p.21-3$ and solving for $\displaystyle y(x)$ by dividing through by x to put the ODE into the general form:

$\displaystyle y' + a_0(x)y = b(x)$

$\displaystyle (3)p.11-3$

Yields:

$p + (2x^{\frac{1}{2}}-{\frac{1}{x}} )y=k$

Where:

$a_o(x)=\frac{(2x^{\frac{3}{2}}-1)}{x}=2x^{\frac{1}{2}}-x^{-1}$

$\displaystyle (4.3.12)$

$b(x)=\frac{k}{x}$

$\displaystyle (4.3.13)$

The ODE can be solved by finding an integrating factor $h(x,y)$ per

$h(x)=exp(\int a_o(x)dx)$

$\displaystyle (3)p.11-4$

$y(x)= \frac{1}{h(x)}\int h(x)b(x)dx+C_1$

$\displaystyle (1)p.11-5$

Substituting in $h(x)=exp(\int a_o(x)dx)$ gives:

$y(x)=\frac{\int exp(\int a_0(x)dx)b(x)+C_1}{exp(\int a_0(x)dx)}$

$\displaystyle (4.3.14)$

Integrating $a_0(x)$ which is given in $\displaystyle (4.3.12)$

$\int a_0(x)dx=\int 2x^{\frac{1}{2}}-x^{-1}=\frac{4}{3}x^{\frac{3}{2}}-ln(x)+C_2$

$\displaystyle (4.3.15)$

Plugging in $\displaystyle (4.3.15)$ and $\displaystyle (4.3.13)$ into $\displaystyle (4.3.14)$ yields:

$y(x)=\frac{\int C_3x^{-1}exp(\frac{4}{3}x^{\frac{3}{2}})\frac{k}{x}+C_1}{ C_3x^{-1}exp(\frac{4}{3}x^{\frac{3}{2}})}$

$\displaystyle (4.3.16)$

where $C_3 = exp(C_2)$

Equation $\displaystyle (4.3.16)$ is the solution for $\displaystyle y(x)$

# R*4.4 Generate a class of exact L2-ODE-VC

## Question from meeting 21, pages 5-6:

Given (2)-(3) from p. 21-4

$G = \underbrace{\underbrace{R(x)}_{\displaystyle a_0(x)} y}_{\displaystyle \ne \phi_x} + \underbrace{\underbrace{Q(x)}_{\displaystyle a_1(x)} y'}_{\displaystyle \ne \phi_y} + \underbrace{\underbrace{P(x)}_{\displaystyle a_2(x)} y''}_{\displaystyle = \phi_p}$

$\displaystyle (Equation\;4.4.1)$

$\phi_x(x,y,p) + \phi_y(x,y,p) \,y' = R(x)y + Q(x)y'$

$\displaystyle (Equation\;4.4.2)$

## Find that the solution gives (1) from p. 21-5

$\phi(x,y,p) = P(x)p + T(x)y + k$

$\displaystyle (Equation\;4.4.3)$

From lecture notes Mtg 21

## Solution

 Solved on our own

The equations (2) and (3) are within the category of L2-ODE-VC. The key is to use the substitution p = y' for the derivations and p' = y.The first step is to prove the exactness of the equations below. There are two exactness conditions for the N2-ODE. Note that the functions R and Q are of x but not y. This affects the 2nd exactness condition and subsequent derivations and integrations.

$G = \underbrace{\underbrace{R(x)}_{\displaystyle a_0(x)} y}_{\displaystyle \ne \phi_x} + \underbrace{\underbrace{Q(x)}_{\displaystyle a_1(x)} y'}_{\displaystyle \ne \phi_y} + \underbrace{\underbrace{P(x)}_{\displaystyle a_2(x)} y''}_{\displaystyle = \phi_p}$

$\displaystyle (Equation\;4.4.1)$

$g(x,y,p) = \phi_x(x,y,p) + \phi_y(x,y,p) \,y' = R(x)y + Q(x)y'$

$\displaystyle (Equation\;4.4.2$

The function with p=y' can be rearranged.

$g(x,y,p) = \phi_x(x,p) + \phi_y(x,p) \,y' = R(x)y + Q(x)p$

$\displaystyle (Equation\;4.4.3)$

The equations satisfy the following form of the 1st exactness condition.

$G = \frac{d \phi}{dx} = \phi_x + \phi_y \,y'+ \phi_p \,y''$

$\displaystyle (Equation\;4.4.4)$

The 2nd exactness condition is derived below. First, assume that

$f(x,p) := \phi_p(x,p)= P(x)$

Then the 2nd exactness condition can be applied satisfactorily.

$f_{xx} + 2pf_{xy} + p^2f_{yy} = g_{xp} + pg_{yp} - g_y$

$f_{xp} + pf_{yp} + 2f_y = g_{pp}$

$\displaystyle (Equation\;4.4.5)$

This can be shown by placing the values of R and Q into the equation for 2nd exactness.

$P_{xx} + 0 + 0 = g_{xp} + pg_{yp} - g_y = Q_{x} - R$

The next step is to find the integration factor h(x) from the equation below.

$g(x,yp) := \phi_x + \phi_y \,y' = \phi_x(x,p) + \phi_y(x,p) \,p = R(x)y + Q(x)p$

Recall that the integration factor in this case is a function of x, so the following equation from meeting 11 can be used.

$\frac{h_x}{h} = -\frac{1}{N}(N_x - M_y) =: \color{blue}{n(x)}$

The integration is simple.

$h(x) = \int \frac{h_x}{h} = -\int \frac{1}{N}(N_x - M_y) = -\int\frac{1}{Q(x)}(Q_x - R)= T(x)y + k$

Subsequently, the final solution is equated below.

$\phi(x,y,p) = h(x) + \int(f,x,y,p) \,dp = P(x)p + T(x)y + k$

### References for R4.4

Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 11) Mtg 11 13 Sep 2011.

Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 16) Mtg 16 22 Sep 2011.

Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 21) Mtg 21 04 Oct 2011.

# R*4.5 Solve a L2-ODE-VC

## Given [3]

 $\displaystyle G=(cosx)y''+(x^2-sinx)y'+2xy=0$ $\displaystyle (Equation\;4.5.1)$

## Find

1）Show Equation(4.5.1) is exact.
2）Find $\displaystyle\, \phi$
3）Solve for $\displaystyle y(x)$.

## Solution

 Solved on our own

1)
The particular form of N2-ODE-VC is

$\displaystyle G(x,y,y',y'')=g(x,y,p)+f(x,y,p)y''$

where

$\displaystyle g(x,y,p)=(x^2-sinx)y'+2xy$

$\displaystyle f(x,y,p)=cosx$

This is shown that Equation(4,5,1) satisfies the 1st exactness condition.
To verify its exactness, we calculate following terms:

$\displaystyle f_x=-sinx;f_{xx}=-cosx;$

$\displaystyle f_{xy}=f_{xp}=0;$

$\displaystyle f_y=0;f_{yy}=f_{yp}=0;$

$\displaystyle g_x=2xy'-cosx\cdot p+2y;$

$\displaystyle g_{xp}=2x-cosx;$

$\displaystyle g_y=2x;g_{yp}=0;$

$\displaystyle g_p=x^2-sinx;g_{pp}=0.$

Recall the 2nd exactness condition for L2-ODE-VC:

 $\displaystyle f_{xx}=2pf_{xy}+p^2f_{yy}=g_{xp}+pg_{yp}-g_y$ $\displaystyle (Equation\;4.5.2)$

 $\displaystyle f_{xp}+pf_{yp}+2f_y=g_{pp}$ $\displaystyle (Equation\;4.5.3)$

Substituting those calculated terms into Equation(4,5,2) and Equation(4.5.3).
As for Equation(4,5,2) ,

$\displaystyle LHS=-cosx+0+0=-cosx$

$\displaystyle RHS=2x-cosx+0-2x=-cosx$

which means $\displaystyle LHS=RHS$
As for Equation(4,5,3) ,

$\displaystyle LHS=0+0+0=0$

$\displaystyle RHS=0$

which means $\displaystyle LHS=RHS$
Therefore, Equation(4,5,1) is exact.

2)
We find the first integral $\displaystyle \phi$
by integrating

$\displaystyle f=\phi_p=cosx$
.
$\displaystyle \phi=h(x,y)+\int fdp$

$\displaystyle \phi=h(x,y)+cosx\cdot p$
Also,

$\displaystyle g=(x^2-sinx)p+2xy=\phi_x+\phi_y p$

where,

$\displaystyle \phi_x=h_x-sinx\cdot p$

$\displaystyle \phi_y=h_y$.

Substituting those partial derivatives of $\phi$ into function g.

$\displaystyle (x^2-sinx)p+2xy=(h_y-sinx)p+h_x$.

To solving h(x,y), we assume that

$\displaystyle h_x=2xy$

Therefore,

$\displaystyle h(x,y)=x^2 y+k_1(y)$

Partial derivate respect to y,

$\displaystyle h_y=x^2+k_1'(y)-sinx=x^2-sinx$

We can find that

$\displaystyle k_1'(y)=0$

which means

$\displaystyle k_1(y)=k_1=constant$.

Therefore, the first integral is

$\displaystyle \phi=x^2y+cosx\cdot p+k_!$

3)
Recall that

$\displaystyle \phi=k_2$,

we obtain a L1-ODE-VC that

$\displaystyle x^2y+cosx\cdot p=k_2 -k_1:=k_3$.

Rewrite it into

$\displaystyle y'+\underbrace{\frac{x^2}{cosx}}_{\displaystyle a_0(x)}y=\underbrace{\frac{k_3}{cosx}}_{\displaystyle b(x)}$

Therefore, the integration factor is

$\displaystyle h(x)=exp[\int^x a_0'(s)ds]$

$\displaystyle =exp[\int^x \frac{s^2}{cos s}ds]$

.

The solution is

 $\displaystyle y(x)=\frac{1}{h(x)}\int^x h(s)b(s)ds$ $\displaystyle =\frac{1}{\exp[\int^x \frac{s^2}{\cos(s)}ds]}\int^x \exp\left[\int^s \frac{s^2}{\cos(s)}ds\right]\frac{k_3}{\cos(s)}ds$

# R*4.6 Show the equivalence of two forms of 2nd exactness condition of N2-ODE

## Given

$\displaystyle g_0 - \frac{d}{dx}g_1+\frac{d^2}{dx^2}g_2=0$

$\displaystyle g_i:=\frac{\partial G}{\partial y^{(i)}} \ , \quad for \ i=0,1,2$

## Find[4]

It's equal to the 2nd exactness condition in form:

$\displaystyle \phi_{xy}=\phi_{yx}\ ,\quad \phi_{px}=\phi_{xp}\ ,\quad \phi_{py}=\phi_{yp}$

## Solution

 Solved on my own

As defined:

$\displaystyle G=\frac{d \phi}{dx} (x,y,p)=0$

$\displaystyle G=\phi_x+\phi_y \cdot p +\phi_p \cdot q$

$\displaystyle for \quad p=y' \ , \ q=y''$

$\displaystyle g_0 = \frac{\partial G}{\partial y} = \frac{\partial}{\partial y}(\phi_x+\phi_yp+\phi_pq) = \frac{\partial}{\partial y}(\frac{d \phi}{dx})$

$\displaystyle \frac{d}{dx}g_1 = \frac{d}{dx}(\frac{\partial G}{\partial p}) = \frac{d}{dx}(\phi_{xp}+\phi_{yp}p+\phi_y+\phi_{pp}q)$

\displaystyle \begin{align} \frac{d^2}{dx^2} g_2& = \frac{d^2}{dx^2}(\frac{\partial G}{\partial q})\\ &=\frac{d^2}{dx^2} [\frac{\partial}{\partial q}(\phi_x + \phi_yp +\phi_pq)] \\ &= \frac{d^2}{dx^2} \phi_p\\ &= \frac{d}{dx}(\phi_{px}+\phi_{py}p+\phi_{pp}q) \end{align}

For we have:

$\displaystyle g_0-\frac{d}{dx}g_1+\frac{d^2}{dx^2}g_2=0$

$\displaystyle \frac{\partial}{\partial y}(\frac{d \phi}{dx}) - \frac{d}{dx}(\phi_{xp}+\phi_{yp}p+\phi_y+\phi_{pp}q) + \frac{d}{dx}(\phi_{px}+\phi_{py}p+\phi_{pp}q) = 0$

Rearranging:

 $\displaystyle [\frac{\partial}{\partial y} (\frac{d\phi}{dx})-\frac{d}{dx}(\frac{\partial \phi}{\partial y})] + \frac{d}{dx} [(\phi_{px}-\phi_{xp})+(\phi_{py}-\phi_{yp})p+(\phi_{pp}-\phi_{pp})q] = 0$ $\displaystyle (Equation\;4.6.1 )$

So, both two parts in the left side of equation 4.6.1 are equal to 0 separately:
For first part:

$\displaystyle \frac{\partial}{\partial y} (\frac{d\phi}{dx})-\frac{d}{dx}(\frac{\partial \phi}{\partial y})=0$

$\displaystyle (\phi_{xy}-\phi_{yx})+(\phi_{yy}-\phi_{yy})p+(\phi_{py}-\phi_{yp}q)=0$

so:

$\displaystyle \phi_{xy}=\phi_{yx}$

$\displaystyle \phi_{py}=\phi_{yp}$

And, second part:

$\displaystyle \frac{d}{dx} [(\phi_{px}-\phi_{xp})+(\phi_{py}-\phi_{yp})p+(\phi_{pp}-\phi_{pp})q] = 0$

$\displaystyle (\phi_{px}-\phi_{xp})+(\phi_{py}-\phi_{yp})p+(\phi_{pp}-\phi_{pp})q = 0$

thus we get:

$\displaystyle \phi_{px}=\phi_{xp}$

# References

1. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL Meeting 19-20 29 Sep 2011
2. Malvern, Lawrence. Introduction to the Mechanics of a Continuous Medium. pgs 210-211. New Jersey: Prentice-Hall, 1969. Print.
3. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL Meeting 21 4 Oct 2011
4. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL Mtg 22 19 Oct 2011

# Team Work Distribution

 Problem Assignments Problem # Assigned To R4.1 Fenner Colson R*4.2 Yi Zhao R*4.3 Ben Neri R*4.4 Manuel Steele R*4.5 Jing Pan R*4.6 Zexi Zheng
 Table of Contributions Name Problems Solved Problems Checked Signature Fenner Colson R4.1 R*4.5 Egm6321.f11.team1.colsonfe 03:13, 19 October 2011 (UTC) Yi Zhao R*4.2 Egm6321.f11.team1.yizhao Manuel Steele R*4.4 R*4.3 Egm6321.f11.team1.steele.m 07:16, 19 October 2011 (UTC) Jing Pan R*4.5 R4.1 R*4.2 Egm6321.f11.team1.pan 15:52, 19 October 2011 (UTC) Benjamin Neri R*4.3 R*4.2 Egm6321.f11.team1.Benneri Zexi Zheng R*4.6 R*4.4 Egm6321.f11.team1.zheng.zx