# User:Egm6321.f11.team3/Hwk3

## R3.1 Exactness Condition of N1-ODE

### Given

 $\underbrace{\bar b(x,y)c(y)}_{\displaystyle \color{blue}{N(x,y)}} \ y' + \underbrace{a(x) \bar c(x,y)}_{\displaystyle \color{blue}{M(x,y)}} = 0$ (3.1.1)

 $\displaystyle \frac{h_x}{h}=-\frac{1}{N}(N_x-M_y)=n(x)$ (3.1.2)

 $\displaystyle M+Ny'=[a(x)y+k_2(x)]+\bar b(x)y' = 0$ (3.1.3)

### Find

Show that the N1-ODE (3.1.1) satisfies the condition of (3.1.2) that an integrating factor h(x) can be found to render it exact, only if k1(y) =d1(contstant). Show that (3.1.1) includes (3.1.3) as a particular solution.

### Solution

We solved this problem on our own.


From 3.1.1 the following can be shown by integration by parts,

 $\displaystyle N(x,y)=c(y) \int {b(s)ds} +c(y)k_1(y)$ (3.1.4)
 $\displaystyle N_x=b(x)c(y)$ (3.1.5)

and

 $\displaystyle M_y=a(x)c(y)$ (3.1.6)

Now we substitute these into (3.1.2),

 $\frac{h_x}{h}=-\frac{1}{N}(\bar b(x)c(y)-a(x) \bar c(y))=n(x)$

Now we integrate using (4)p11-3,

 $h_x=-\exp \left[ \int_{}^{x}\frac{1}{N}(\bar b(x)c(y)-a(x) \bar c(y)) \right]$

And subsitute in 3.1.4,

 $h_x=-\exp \left[ \int_{}^{x}\frac{b(x)c(y)-a(x)c(y)}{c(y) \int {b(s)ds} +c(y)k_1(y)} \right]$

Simplified as,

 $h_x=-\exp \left[ \int_{}^{x}\frac{b(x)-a(x)}{\int {b(s)ds} +k_1(y)} \right]$

k_1 must not be dependant on y and therefore must be a constant for 3.1.2 to be satified.

For the second part of the problem,

 $\displaystyle \left[c(y) \int {b(s)ds} +c(y)k_1(y))\right]y'+\left[a(x) \int {c(s)ds} +a(x)k_2(x))\right]$

3.1.3 can be shown to be a paricular solution of 3.1.1 if,

 $\displaystyle c(y)=1, k_1(y)=0, a(x)=1$

 $\displaystyle \left[1 \int {b(s)ds} +1*0)\right]y'+\left[a(x) \int {c(s)ds} +1*k_2(x))\right]$

 $\displaystyle M+Ny'=[a(x)y+k_2(x)]+\bar b(x)y' = 0$

## R*3.2 - Showing Excatness and Finding the Integrating Factor Method

### Given

 $\displaystyle \left( \frac {1}{3}x^3+d_1\right)\left(y^4\right)y' + (5x^3+2)\left(\frac {1}{5}y^5+ sinx + d_2\right) = 0$ (3.2.1)

### Find

Show that the Equation (3.2.1) is exact or not. If it is not, can it be made exact by using the IFM?

Find the IFM h(x,y).

### Solution

1. First exactness condition,

$\displaystyle N(x,y)y' + M(x,y) = 0$

with

 $\displaystyle M(x,y) = (5x^3+2)\left(\frac {1}{5}y^5+ sinx + d_2\right)$ (3.2.2)

and

 $\displaystyle N(x,y) = \left( \frac {1}{3}x^3+d_1\right)\left(y^4\right)$ (3.2.3)

so it satisfies the first condition.

2. Second exactness condition

 $\displaystyle M_{y} (x,y)= a(x).c(y)= (5x^3+2) (y^4)$ (3.2.4)
 $\displaystyle N_{x} (x,y)= b(x).c(y)= (x^2) (y^4)$ (3.2.5)

so

$\displaystyle M_{y}(x,y) \ne N_{x}(x,y)$

Therefore, Eq (3.2.1) is not exact.

3. Finding an integrating factor h(x,y) such that the following exact N1-ODE:

 $\displaystyle h(x,y) \left[\underbrace{\bar b(x,y) c(y)}_{\displaystyle\color{blue}{N(x,y)}} \, y' + \underbrace{a(x) \bar c(x,y)}_{\displaystyle \color{blue}{M(x,y)}}\right]=0$ (3.2.6)

satisfies the condition (2) p,11-2 :

 $\displaystyle \frac{h_{x}}{h}= -\frac{1}{N}(N_{x}-M_{y})=: n(x)$ (3.2.7)

that an integrating factor h(x) can be found to render it exact, only if $\displaystyle k_1(y)=d_1$ (constant)

then

Substituting $\displaystyle N$ Eq (3.2.3), $\displaystyle N_{x}$ Eq (3.2.5), and $\displaystyle M_{y}$ Eq (3.2.4) into Eq (3.2.7)

 $\displaystyle n(x)= -\frac {1}{\bar b(x)\cancel{c(y)}}\left[ b(x)\cancel{c(y)}-a(x)\cancel{c(y)}\right] = -\frac {1}{\frac{1}{3} x^3}[x^2-(5x^3+2)]$ (3.2.8)
 $\displaystyle n(x)= 3(\frac{2}{x^3}-\frac{1}{x}+5)$ (3.2.9)

Changing the variable of function,

 $\displaystyle n(s)= 3(\frac{2}{s^3}-\frac{1}{s}+5)$ (3.2.10)

Definition from $\displaystyle h(x)$

 $\displaystyle h(x) = exp \left[\int^x n(s)ds + k \right]$ (3.2.11)

Substituting $\displaystyle n(s)$ into Eq (3.2.11)

 $\displaystyle h(x) = exp \left[3 \int^x (\frac{2}{s^3}-\frac{1}{s}+5)ds + k \right]$ (3.2.12)
 $\displaystyle h(x) = exp \left[-\frac{3}{x^2}-3ln(x)+15x+ k \right]$ (3.2.13)
 $\displaystyle h(x) = \frac{1}{x^3}exp \left[-\frac{3}{x^2}+15x + k \right]$ (3.2.14)

## R*3.3 - Showing Excatness and Finding the First Integral

### Given

$\displaystyle a(x)=\sin x^{3}$

$\displaystyle b(x)=\cos x$

$\displaystyle c(y)=\exp(2y)$

### Find

1. Find an N1-ODE of the form (1) p.13-2 that is either exact or can be made exact by IFM. (See R3.1)

 $\displaystyle \underbrace{\bar b(x,y) c(y)}_{\displaystyle\color{blue}{N(x,y)}} \, y' + \underbrace{a(x) \bar c(x,y)}_{\displaystyle \color{blue}{M(x,y)}}=0$ (3.3.1)

2. Find the first integral

$\phi(x,y)=k$

### Solution

1. From definitions Eq. (2) p.13-2 and (1) p.13-3,

 $\displaystyle \bar{b}(x,y) \left( x\right) = \int\limits_{{}}^{x}{{b} \left( s\right)}ds = \int\limits_{{}}^{x}{cos(s)}ds = sin x$ (3.3.2)

 $\displaystyle \bar{c}(x,y) \left( y\right) = \int\limits_{{}}^{y}{{c} \left( s\right)}ds = \int\limits_{{}}^{y}{e^{2s}} ds = \frac{1}{2}e^{2y}$ (3.3.3)

Let substituting $\displaystyle a(x),\bar{b}(x), \bar{c}(y), c(y)$ into Eq. 3.3.1, we have

 $sin (x) e^{2y} y' + sin(x^{3}) \frac{1}{2} e^{2y} = 0$ (3.3.4)

We can cancel Eq. 3.3.4 by $\displaystyle e^{2y}$, then

 $sin (x)y' + \frac{1}{2} sin(x^{3}) = 0$ (3.3.5)

i. First exactness condition,

$\displaystyle N(x,y)y' + M(x,y) = 0$

with

 $\displaystyle M(x) = \frac{1}{2} sin(x^{3})$ (3.3.6)

and

 $\displaystyle N(x) = sin (x)$ (3.3.7)

so it satisfies the first condition.

ii. Second exactness condition

 $\displaystyle M_{y} (x,y)= \frac{\partial M }{\partial y} = 0$ (3.3.8)
 $\displaystyle N_{x} (x,y)= \frac{\partial N }{\partial x} = cos(x)$ (3.3.9)

so

$\displaystyle M_{y}(x,y) \ne N_{x}(x,y)$

Therefore, Eq (3.3.5) is not exact.

iii.' Finding an integrating factor h(x,y) such that the following exact N1-ODE:

 $h(x)\left[\underbrace{sin(x)}_{N(x,y)}{y}'+\underbrace{\frac{1}{2}sin({{x}^{3}})}_{M(x,y)}\right]=0$ (3.3.10)

satisfies the condition (2) p,11-2 :

 $\displaystyle \frac{h_{x}}{h}= -\frac{1}{N}(N_{x}-M_{y})=: n(x)$ (3.3.11)

then

Substituting $\displaystyle N$, $\displaystyle N_{x}$ , and $\displaystyle M_{y}$ into Eq (3.3.11)

 $\displaystyle n(x)= -\frac {1}{sin x}[cos x - 0]$ (3.3.12)
 $\displaystyle n(x)= -\frac {cos x}{sin x}$ (3.3.13)

Changing the variable of function,

 $\displaystyle n(s)= -\frac {cos (s)}{sin (s)}$ (3.3.14)

Definition from $\displaystyle h(x)$

 $\displaystyle h(x) = exp \left[\int^x n(s)ds + k \right]$ (3.3.15)

Substituting $\displaystyle n(s)$ into Eq (2.18.10)

 $\displaystyle h(x) = exp \left[\int^x (-\frac {cos (s)}{sin (s)})ds + k \right]$ (3.3.16)
 $\displaystyle h(x) = exp \left[-ln(sin (x))+ k \right]$ (3.3.17)
 $\displaystyle h(x) = \frac{1}{sin x}$ (3.3.18)

Now, we can find exact N1-ODE because we have the integrating factor h(x),

 $\displaystyle \underbrace {(hN)}_{\displaystyle \color{blue}{\bar N}} \, y' + \underbrace{(hM)}_{\displaystyle \color{blue}{\bar M}}=0$ (3.3.19)

So then

 $\left[\underbrace{\frac {1}{sin x}sin(x)}_{\bar N(x,y)} \, y' +\underbrace{\frac {1}{sin x}\frac{1}{2}sin({{x}^{3}})}_{\bar M(x,y)}\right]=0$ (3.3.20)

If we rearrange and rewrite it, we will have

 $\left[\underbrace{1}_{\bar N(x,y)} \, y' +\underbrace{\frac{sin (x^3)}{2 sin (x)}}_{\bar M(x,y)}\right]=0$ (3.3.21)

iv. If we test second exactness condition for Eq. 3.3.21

 $\displaystyle \bar M_{y} (x,y)= \frac{\partial \bar M }{\partial y} = 0$ (3.3.22)
 $\displaystyle \bar N_{x} (x,y)= \frac{\partial \bar N }{\partial x} = 0$ (3.3.23)

so

$\displaystyle \bar M_{y}(x,y) = \bar N_{x}(x,y)$

Therefore, Eq (3.3.21) is exact.

2. To find $\displaystyle\phi(x,y)=k$, we need to use the exact N1-ODE we have found in Eq. 3.3.21

From Eq. (2) p. 8-5 and (1) p. 8-6 respectively,

 $\bar M(x,y)=\frac{\partial \phi{(x,y)}}{\partial {x}}=:\phi_{x}{(x,y)}$ (3.3.24)
 $\bar N(x,y)=\frac{\partial \phi{(x,y)}}{\partial {y}}=:\phi_{y}{(x,y)}$ (3.3.25)

If we integrate Eq. 3.3.24 and Eq. 3.3.25 with respect to x, y, respectively, we will get

 $\int \phi_{x}{(x,y)}dx = \phi {(x,y)} = \int \bar M(x,y) dx + k(y)$ (3.3.26)
 $\,\int \phi_{y}{(x,y)}dy = \phi {(x,y)} = \int \bar N(x,y) dy + k(x)$ (3.3.27)

If we differentiate Eq. 3.3.26 with respect to y , we will have

 $\displaystyle \frac{\partial \phi{(x,y)}}{\partial {y}} = \frac{d ( \int \bar M(x,y) dx) }{dy} + k'(y)$ (3.3.28)
 $\displaystyle \bar N(x,y) = 0 + k'(y)$ (3.3.29)
 $\displaystyle 1 = k'(y)$ (3.3.30)

Integrate Eq. 3.3.30 with respect to y,

 $\displaystyle y + c = k(y)$ (3.3.31)

Substituting Eq. 3.3.31 into Eq. 3.3.26 to get $\displaystyle\phi(x,y)$

 $\phi ( x,y )=\int{\bar M\left( x,y \right)dx + y + c}$ (3.3.32)

As a result,

 $\phi ( x,y )=\int{\frac{sin (x^3)}{2 sin (x)}dx + y = k}$ (3.3.33)

## R3.4-Construct a class of N1-ODEs with h is a function of y

### Given

A class of N1-ODES of the form:

 $\displaystyle \bar{b}(x,y)c(y){y}'+a(x)\bar{c}(x,y)=0$ (3.4.1)

Case 2:suppose h(x,y) is a function of y only:

 $\displaystyle \frac{h_{y}}{h}=\frac{1}{M}(N_{x}-M_{y})=:m(y)$ (3.4.2)

### Find

Construct a class of N1-ODEs,which is the counterpart of 3.4.1,and satisfies the condition 3.4.2 that integrating factor h(y) can be found to render it exact.

### Solution

We suppose a N1-ODE function that has the form:

 $\displaystyle a(y)\bar{c}(x,y){y}'+\bar{b}(y)c(x)=0$ (3.4.3)
 $\displaystyle \bar{c}(x,y)=\int ^{x}c(s)ds+k_{1}(y)$ (3.4.4)
 $\displaystyle \bar{b}(y)=\int ^{y}b(s)ds+k_{2})$ (3.4.5)
 $\displaystyle N_{x}=a(y)c(x)$ (3.4.6)
 $\displaystyle M_{y}=b(y)c(x)$ (3.4.7)
 $\displaystyle \Rightarrow\frac{h_{y}}{h}=\frac{1}{M}(N_{x}-M_{y})=\frac{1}{\bar{b}(y)c(x)}(a(y)c(x)-b(y)c(x))=:m(y)$ (3.4.8)

where a(y),b(y),c(x) are arbitrary functions.
This problem is sovled by ourselves

## R*3.5 - Derive the equations of motion of a particle in the air.

### Find

1. Derive the equations of motion which (3.5.1) and (3.5.2) form a System of Coupled N1-ODES

 $\displaystyle m\frac{\mathrm{d}v_{x}}{\mathrm{d}t}=-kv^{n}\cos \alpha$ (3.5.1)

 $\displaystyle m\frac{\mathrm{d}v_{y}}{\mathrm{d}t}=-kv^{n}\sin \alpha - mg$ (3.5.2)

 $\displaystyle v^{2}=(v_{x})^{2}+(v_{y})^{2}$ (3.5.3)

 $\displaystyle \tan \alpha=\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{\frac{\mathrm{d}y}{\mathrm {d}t}}{\frac{\mathrm{d}x}{\mathrm{d}t}}=\frac{v_{y}}{v_{x}}$ (3.5.4)

2. Particular case $\displaystyle k = 0$ : Verify that $\displaystyle y(x)$ is parabola.

3. Consider the case $\displaystyle k \neq 0$ and $\displaystyle v_{x0} = 0$

3.1 Is (3.5.5) either exact or can be made exact using IFM?

 $\displaystyle m\frac{\mathrm{d}v_{y}}{\mathrm{d}t}=-k(v_{y})^{n}-mg$ (3.5.5)

Find $\displaystyle v_{y}(t)$ and $\displaystyle y(t)$ for $\displaystyle m$ constant.

3.2 Find $\displaystyle v_{y}(t)$ and $\displaystyle y(t)$ for $\displaystyle m = m(t)$

### Solution

We solved this problem on our own.


1.
According to Newton's Second Law,

 $\displaystyle \sum F=m\frac{\mathrm{d}}{\mathrm{d}t}v$ (3.5.6)

there are two forces acting on particle.

 $\displaystyle F_{x}+F_{y}=m\frac{\mathrm{d}}{\mathrm{d}t}v$ (3.5.7)

Using angle $\displaystyle \alpha$ to project force into x-axis and y-axis. We can get

 $\displaystyle F(x)=m\frac{\mathrm{d}v_{x}}{\mathrm{d}t}=-kv^{n}\cos\alpha$ (3.5.8)

 $\displaystyle F(y)=m\frac{\mathrm{d}v_{y}}{\mathrm{d}t}=-kv^{n}\sin\alpha-mg$ (3.5.9)

 $\displaystyle v^{2}=(v_{x})^{2}+(v_{y})^{2}$ (3.5.10)

 $\displaystyle \tan\alpha=\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{\frac{\mathrm{d}y}{\mathrm{d}t}}{\frac{\mathrm{d}x}{\mathrm{d}t}}=\frac{v_{y}}{v_{x}}$ (3.5.11)

2.
With $\displaystyle k = 0$ (3.5.1) and (3.5.2) become

 $\displaystyle m\frac{\mathrm{d}v_{x}}{\mathrm{d}t}=-kv^{n}\cos\alpha=0$ (3.5.12)

 $\displaystyle m\frac{\mathrm{d}v_{y}}{\mathrm{d}t}=-kv^{n}\sin\alpha-mg=-mg$ (3.5.13)

After integration with respect to time

 $\displaystyle v_{x}=v_{x0}$ (3.5.14)

 $\displaystyle v_{y}=-gt+v_{y0}$ (3.5.15)

Integrate equations again,we can get

 $\displaystyle x=v_{x0}t+x_{0}$ (3.5.16)

 $\displaystyle y=-\frac{gt^{2}}{2}+v_{y0}t+y_{0}$ (3.5.17)

Thus, we can express t in terms of x

 $\displaystyle t=\frac{x-x_{0}}{v_{x0}}$ (3.5.18)

 $\displaystyle y=-\frac{g}{2}(\frac{x-x_{0}}{v_{x0}})^{2}+v_{y0}\frac{x-x_{0}}{v_{x0}}+y_{0}$ (3.5.19)

Thus, y(x) is parabola.
3.
With $\displaystyle k\neq0$ and $\displaystyle v_{x0}=0$

 $\displaystyle m\frac{\mathrm{d}v_{x}}{\mathrm{d}t}=-kv^{n}\cos\alpha=-kv^{n}\frac{v_{x}}{v}=-kv^{n-1}v_{x}$ (3.5.20)

Thus, if $\displaystyle v_{x0}=0$ then $\displaystyle \alpha = 90^{\circ}$, equation(3.5.2) becomes

 $\displaystyle m\frac{\mathrm{d}v_{y}}{\mathrm{d}t}=-k(v_{y})^{n}-mg$ (3.5.21)

3.1
First we put equation(3.5.21) into the first exactness form

 $\displaystyle k(v_{y})^{n}+mg+m\frac{\mathrm{d}v_{y}}{\mathrm{d}t}=0$ (3.5.22)

 $\displaystyle M(v_{y},t)=k(v_{y})^{n}+mg,N(v_{y},t)=m$ (3.5.23)

The second exactness condition is

 $\displaystyle M(v_{y},t)_{v_{y}}=N(v_{y},t)_{t}$ (3.5.24)

Clearly, the second exactness condition is not met.

 $\displaystyle M(v_{y},t)_{v_{y}}=knv_{y}^{n-1}\neq N(v_{y},t)_{t}=0$ (3.5.24)

Thus, the equation(3.5.21) is not exact.
The equation (3.5.21) can be made exact using IFM

 $\displaystyle h(v_{y},t)(kv_{y}^{n}+mg)+h(v_{y},t)m\frac{\mathrm{d}v_{y}}{\mathrm{d}t}=0$ (3.5.25)

 $\displaystyle \phi_{t}=h(v_{y},t)(kv_{y}^{n}+mg),\phi_{v_{y}}=h(v_{y},t)m,\phi_{t,v_{y}}=\phi_{v_{y},t}$ (3.5.26)

 $\displaystyle \frac{\partial h(v_{y},t)}{\partial v_{y}}(kv_{y}^{n}+mg)+h(v_{y},t)\frac{\partial (kv_{y}^{n}+mg)}{\partial v_{y}}=\frac{\partial h(v_{y},t)}{\partial t}m+h(v_{y},t)\frac{\partial m}{\partial t}$ (3.5.27)

Let $\displaystyle \frac{\partial h}{\partial v_{y}} = 0$ and $\displaystyle \frac{\partial m}{\partial t}=0$

 $\displaystyle h(v_{y},t)\frac{\partial (kv^{n}_{t}+mg)}{\partial v_{y}}=\frac{\partial h(v_{y},t)}{\partial t}m$ (3.5.28)

 $\displaystyle h(v_{y},t)\frac{nkv_{y}^{n-1}}{m}=\frac{\partial h(v_{y},t)}{\partial t}$ (3.5.29)

 $\displaystyle h=exp(\frac{knv^{n-1}}{m}t)$ (3.5.30)

Thus, multiply equation (3.5.22) by (3.5.30)

 $\displaystyle exp(\frac{knv^{n-1}}{m}t)v'+exp(\frac{knv^{n-1}}{m}t)[\frac{k}{m}v^{n}+g]=0$ (3.5.31)

 $\displaystyle v_{y}(t)=\frac{1}{exp(\frac{knv^{n-1}}{m}t)}\int^{t}(-exp(\frac{knv^{n-1}}{m})g+k)\mathrm{d}s$ (3.5.32)

 $\displaystyle y(t)=\int^{t}\frac{1}{exp(\frac{knv^{n-1}}{m}t)}\int^{w}-exp(\frac{knv^{n-1}}{m})g\mathrm{d}s\mathrm{d}w$ (3.5.33)

3.2
If $\displaystyle m = m(t)$, equation (3.5.22) becomes

 $\displaystyle k(v_{y})^{n}+mg+\frac{\mathrm{d}mv_{y}}{\mathrm{d}t}=0$ (3.5.34)

 $\displaystyle m\frac{\mathrm{d}v_{y}}{\mathrm{d}t}+v_{y}\frac{\mathrm{d}m}{\mathrm{d}t}+kv_{y}^{n}+mg=0$ (3.5.35)

 $\displaystyle h(v_{y},t)(kv_{y}^{n}+mg)+h(v_{y},t)\frac{\mathrm{d}mv_{y}}{\mathrm{d}t}=0$ (3.5.36)

 $\displaystyle h(v_{y},t)\frac{\partial (kv_{t}^{n}+mg)}{\partial v_{y}}=\frac{\partial h(v_{y},t)}{\partial t}m+h(v_{y},t)\frac{\partial m}{\partial t}$ (3.5.37)

 $\displaystyle \frac{\partial h(v_{y},t)}{\partial t}=h(v_{y},t)[\frac{nkv_{t}^{n-1}-m_{t}}{m}]$ (3.5.38)

 $\displaystyle m_{t}=\frac{\partial m}{\partial t}$ (3.5.39)

 $\displaystyle h=exp[\int \frac{nkv_{t}^{n-1}-m_{t}}{m}]$ (3.5.40)

Thus, Put this $\displaystyle h$ into equation we can get the result. It is too complicated, so we need another methods to solve this problem.

## R*3.6 Coupled Pendulum Equations of Motion

### Find

Derive the equations of motion (3.6.1) and (3.6.2).

 $m_1l^2\ddot \theta_1 = -ka^2(\theta_1-\theta_2)-m_1gl\theta_1+u_1l$ (3.6.1)

 $m_2l^2\ddot \theta_2 = -ka^2(\theta_2-\theta_1)-m_2gl\theta_2+u_2l$ (3.6.2)

Write (3.6.1) and (3.6.2) in matrix form,

 $\mathbf{\dot{x}}(t)=\mathbf{A}(t)\mathbf{x}(t)+\mathbf{B}(t)\mathbf{u}(t)$ (3.6.3)

with

 $\mathbf{x}:=\left \lfloor \theta_1 \dot \theta_1 \theta_2 \dot \theta_2\right\rfloor ^T \in \mathbb R^{4 \times 1}$ (3.6.4)

### Solution

The solution was solved first and then compared with previous solutions.


In the case of small oscillations,

 $\displaystyle \sin{\theta}=\theta$
 $\displaystyle \cos{\theta}=1$

Rotational acceleration is defined as

 $\displaystyle acceleration = l\ddot\theta$

For the pendulum system, the forces acting the masses are:
The force in the spring,

 $\displaystyle F_{s1} = ka(\theta_2-\theta_1)$
 $\displaystyle F_{s2} = ka(\theta_1-\theta_2)$

The inertial force of the mass,

 $\displaystyle F_1 = -m_1g\sin{\theta_1}=-m_1g\theta_1l$
 $\displaystyle F_2 = -m_2g\sin{\theta_2}=-m_2g\theta_2l$

Now we sum the moments about the hinge point for the first pendulum,

 $\displaystyle \sum{M} = (m_1\ddot\theta_1l)l-(ka(\theta_2-\theta_1))a+(m_1g\theta_1)l-u_1l=0$

 $\displaystyle m_1l^2\ddot\theta_1=-ka^2(\theta_1-\theta_2)-m_1gl\theta_1+u_1l$

Now we sum the moments about the hinge point for the second pendulum,

 $\displaystyle \sum{M} = (m_2\ddot\theta_2l)l-(ka(\theta_1-\theta_2))a+(m_2g\theta_2)l-u_2l=0$

 $\displaystyle m_2l^2\ddot\theta_2=-ka^2(\theta_2-\theta_1)-m_2gl\theta_2+u_2l$

Since 3.6.3 call for x_dot, we just rearrange 3.6.1 and 3.6.2 to be put into matrix form 3.6.3. The common denominator is maintained to simplify the adding of terms in the matrix.

 $\mathbf{\dot x}:=\left \lfloor \dot \theta_1 \ddot \theta_1 \dot \theta_2 \ddot \theta_2 \right\rfloor ^T \in \mathbb R^{4 \times 1}$

 $\displaystyle \ddot\theta_1=\frac{-ka^2(\theta_1-\theta_2)}{m_1l^2}-\frac{m_1gl\theta_1}{m_1l^2}+\frac{u_1l}{m_1l^2}$

 $\displaystyle \ddot\theta_2=\frac{-ka^2(\theta_2-\theta_1)}{m_2l^2}-\frac{m_2gl\theta_2}{m_2l^2}+\frac{u_2l}{m_2l^2}$

 $\displaystyle \begin{bmatrix}\dot \theta_1 \\ \ddot \theta_1\\ \dot \theta_2\\ \ddot \theta_2 \end{bmatrix}=\mathbf{A}\begin{bmatrix}\theta_1\\ \dot \theta_1\\ \theta_2\\ \dot \theta_2 \end{bmatrix}+\mathbf{B}\mathbf{u}$

 $\displaystyle \begin{bmatrix}\dot \theta_1\\ \ddot \theta_1\\ \dot \theta_2\\ \ddot \theta_2 \end{bmatrix}= \begin{bmatrix} 0& 1& 0& 0&\\ \frac{-ka^2+m_1gl}{m_1l^2}& 0& \frac{ka^2}{m_1l^2}& 0\\0&0&0&1&\\ \frac{ka^2}{m_2l^2}& 0& \frac{-ka^2+m_2gl}{m_2l^2}& 0\end{bmatrix} \begin{bmatrix}\theta_1\\ \dot \theta_1\\ \theta_2\\ \dot \theta_2 \end{bmatrix}+ \begin{bmatrix}0&0\\ \frac{1}{m_1l}&0\\0&0\\0& \frac{1}{m_2l}&\end{bmatrix} \begin{bmatrix}u_1\\u_2\end{bmatrix}$

## R*3.7 Use IFM to find the solution of L1-ODE-CC

### Given

 $\displaystyle \dot x(t)=ax(t)+bu(t)$ (3.7.1)

### Find

Use IFM to show that the solution of (3.7.1) is

 $\displaystyle x(t)=[\exp\{a(t-t_{0})\}]x(t_{0})+\int_{t_{0}}^{t}[\exp\{a(t-\tau)\}]bu(\tau)\mathrm{d}\tau$ (3.7.2)

Identity the integrating factor, the homogeneous solution, and the particular solution.
Show that the solution of the L1-ODE-VC is

 $\displaystyle x(t)=[\exp\int^{t}_{t_{0}}a(\tau)\mathrm{d}\tau]x(t_{0})+\int_{t_{0}}^{t}[\exp\int_{\tau}^{t}a(s)\mathrm{d}s]b(\tau)u(\tau)\mathrm{d}\tau$ (3.7.3)

### Solution

We solved this problem on our own.

 $\displaystyle \dot x(t)-ax(t)=bu(t)$ (3.7.4)

 $\displaystyle h(t)=\exp[\int-a\mathrm{d}t]=e^{-at}$ (3.7.5)

Multiply integrating factor to the equation (3.7.4)

 $\displaystyle [\dot x(t)-ax(t)]e^{-at}=bu(t)e^{-at}$ (3.7.6)

 $\displaystyle \dot x(t)e^{-at}-ax(t)e^{-at}=bu(t)e^{-at}$ (3.7.7)

 $\displaystyle [e^{-at}x(t)]{}'=bu(t)e^{-at},t_{0}< \tau (3.7.8)

Integrate the equation (3.7.8) from $\displaystyle t_{0}< \tau

 $\displaystyle e^{-at}x(t)-e^{-at_{0}}x(t_{0})=\int^{t}_{t_{0}}bu(\tau)e^{-at}\mathrm{d}\tau$ (3.7.9)

Thus, we can get

 $\displaystyle x(t)=e^{a(t-t_{0})}x(t_{0})+\int_{t_{0}}^{t}e^{a(t-\tau)}bu(\tau)\mathrm{d}\tau$ (3.7.10)

The first term on the right hand side of equation (3.7.10) is homogeneous solution and the second term is particular solution.
In order to obtain the equation(3.7.3), we can notice that the integrating factor becomes

 $\displaystyle h(t)=\exp[\int -a(t)d(t)]$ (3.7.11)

Thus we can change this new integrating factor into equation (3.7.10) to get the solution of equation (3.7.12)

 $\displaystyle \dot x(t)=a(t)x(t)+b(t)u(t)$ (3.7.12)

## R*3.8 Generalize SC-L1-ODE-CC to the case of linear time-variant system

### Given

 $\displaystyle x(t)=[\exp\{\mathbf{A}(t-t_{0})\}]\mathbf{x}(t_{0})+\int_{t_{0}}^{t}[\exp\{\mathbf{A}(t-\tau)\}]\mathbf{B}\mathbf{u}(\tau)\mathrm{d}\tau$ (3.8.1)

### Find

Generalize equation (3.8.1) to the case of linear time-variant system system. Verify that your expression is indeed the solution of linear time-variant system

### Solution

We solved this problem on our own.


L1-ODE-CC :

 $\displaystyle x(t)=[\exp\{a(t-t_{0})\}]x(t_{0})+\int^{t}_{t_{0}}[\exp\{a(t-\tau)\}]bu(\tau)\mathrm{d}\tau$ (3.8.2)

L1-ODE-VC :

 $\displaystyle x(t)=[\exp\int_{t_{0}}^{t}a(\tau)\mathrm{d}\tau]x(t_{0})+\int^{t}_{t_{0}}[\exp\int^{t}_{\tau}a(s)\mathrm{d}s]b(\tau)u(\tau)\mathrm{d}\tau$ (3.8.3)

SC-L1-ODE-CC :

 $\displaystyle x(t)=[\exp\{\mathbf{A}(t-t_{0})\}]\mathbf{x}(t_{0})+\int_{t_{0}}^{t}[\exp\{\mathbf{A}(t-\tau)\}]\mathbf{B}\mathbf{u}(\tau)\mathrm{d}\tau$ (3.8.4)

Comparing the equation (3.8.2) with (3.8.3), we can derive the solution of SC-L1-ODE-VC

 $\displaystyle x(t)=[\exp\int_{t_{0}}^{t}\mathbf{A}(\tau)\mathrm{d}\tau]\mathbf{x}(t_{0})+\int^{t}_{t_{0}}[\exp\int^{t}_{\tau}\mathbf{A}(s)\mathrm{d}s]\mathbf{B}(\tau)\mathbf{u}(\tau)\mathrm{d}\tau$ (3.8.5)

## R*3.9-Verify the state transition matrix $\displaystyle \mathbf{\Phi }$

### Given

The fundamental or state transition matrix $\displaystyle \mathbf{\Phi }$ is related to the integrating factor:

 $\displaystyle \mathbf{\Phi }(t,t_{0})=exp{\mathbf{A}(t-t_{0})}$ (3.9.1)
 $\displaystyle \frac{\mathrm{d} \mathbf{\Phi }(t,t_{0})}{\mathrm{d} x}=\mathbf{A}\mathbf{\Phi }(t,t_{0})$ (3.9.2)
 $\displaystyle \mathbf{\Phi}(t,t_{0})=\mathbf{I}$ (3.9.3)

### Find

Verify that 3.9.1 satisties 3.9.2-3.9.3

### Solution

We know that:

 $\displaystyle exp(x)=1+\frac{x}{1!}+\frac{x^{2}}{2!}+\cdot \cdot \cdot =\sum_{k=0}^{\infty }\frac{x^{k}}{k!}$ (3.9.4)

and

 $\displaystyle exp(\mathbf{A})=\mathbf{I}+\frac{x}{1!}\mathbf{A}+\frac{x^{2}}{2!}\mathbf{A}+\cdot \cdot \cdot =\sum_{k=0}^{\infty }\frac{1}{k!}\mathbf{A}^{k}$ (3.9.5)
 $\displaystyle \Rightarrow \frac{\mathrm{d} \mathbf{\Phi }(t,t_{0})}{\mathrm{d} x}=\frac{\mathrm{d} exp({\mathbf{A}(t-t_{0})})}{\mathrm{d} x}=\mathbf{A}(t-t_{0})exp(\mathbf{A}(t-t_{0}))=\mathbf{A}\mathbf{\Phi }(t,t_{0})$ (3.9.6)
 $\displaystyle \mathbf{\Phi }(t_{0},t_{0})=exp(\mathbf{A}(t_{0}-t_{0}))=exp(\mathbf{A}(0))=\mathbf{I}+\frac{1}{1!}\mathbf{A}(0)+\frac{1}{2!}\mathbf{A}^{2}(0)+\cdot \cdot \cdot =\sum_{k=0}^{\infty }\frac{1}{k!}\mathbf{A}^{k}(0)=\mathbf{I}$ (3.9.7)

This problem is solved by ourselves


## R3.10 Find the solution of free vibration of coupled pendulums

### Given

Pendulums:

 $\displaystyle a=0.3,l=1,k=0.2,m_{1}g=3,m_{2}g=6,g=10$ (3.10.1)

No applied forces:

 $\displaystyle u_{1}=u_{2}=0$ (3.10.2)

Initial conditions:

 $\displaystyle \theta_{1}(0)=0,\dot\theta_{1}(0)=-2,\theta_{2}(0)=0,\dot\theta_{2}(0)=1$ (3.10.3)

### Find

1. Use matlab's ode45 command to integrate the system (1)-(2) p.14-5 in matrix form (1) p.14-4 for $\displaystyle t\in[0,7]$

2. Use (2) p.15-2 to find the solution at the same time stations as in Q1.

3. Plot $\displaystyle \theta_{1}(t)$ and $\displaystyle \theta_{2}(t)$ from Q1 and form Q2.

### Solution

We solved this problem on our own.


Put equation (3.10.4) and (3.10.5) in matrix form (3.10.6)

 $\displaystyle m_{1}l^{2}\ddot \theta_{1}=-ka^{2}(\theta_{1}-\theta_{2})-m_{1}gl\theta_{1}+u_{1}l$ (3.10.4)

 $\displaystyle m_{2}l^{2}\ddot \theta_{2}=-ka^{2}(\theta_{2}-\theta_{1})-m_{2}gl\theta_{2}+u_{2}l$ (3.10.5)

 $\displaystyle \begin{bmatrix}\dot\theta_{1}\\\ddot\theta_{1}\\\dot\theta_{2}\\\ddot\theta_{2}\end{bmatrix}=\begin{bmatrix}0&1&0&0\\ \frac{-ka^{2}}{m_{1}l^{2}}-\frac{g}{l}& 0 & \frac{ka^{2}}{m_{1}l^{2}} &0 \\ 0 & 0 & 0 & 1\\ \frac{ka^{2}}{m_{2}l^{2}} &0 &-\frac{-ka^{2}}{m_{2}l^{2}}-\frac{g}{l} &0 \end{bmatrix}\begin{bmatrix} \dot\theta_{1}\\ \ddot\theta_{1}\\ \dot\theta_{2}\\ \ddot\theta_{2}\end{bmatrix} + \begin{bmatrix} 0& 0\\ \frac{1}{m_{1}l^{2}} &0 \\ 0 &0 \\ 0 &\frac{1}{m_{2}l^{2}}\end{bmatrix} \begin{bmatrix}u_{1}l\\ u_{2}l \end{bmatrix}$ (3.10.6)

Put parameters into matrix form.

 $\displaystyle \begin{bmatrix}\dot\theta_{1}\\\ddot\theta_{1}\\\dot\theta_{2}\\\ddot\theta_{2}\end{bmatrix}=\begin{bmatrix}0&1&0&0\\ -10.06& 0 & 0.06&0 \\ 0 & 0 & 0 & 1\\ 0.03 &0 &-10.03 &0 \end{bmatrix}\begin{bmatrix} \dot\theta_{1}\\ \ddot\theta_{1}\\ \dot\theta_{2}\\ \ddot\theta_{2}\end{bmatrix}$ (3.10.7)

1.

Using the following matlab's code to compute the solution

 options = odeset('RelTol',1e-4,'AbsTol',[1e-5 1e-5 1e-5 1e-5]); [T,Y] = ode45(@pendulums,[0 7],[0 -2 0 1],options); plot(T,Y(:,1),'-',T,Y(:,3),'.') function dy = pendulums(t,y) dy = zeros(4,1); % a column vector dy(1) = y(2); dy(2) = -10.06*y(1) + 0.06*y(3); dy(3) = y(4); dy(4) = 0.03*y(1) + -10.03*y(3); 

2.

Using (3.10.8) to find the solution at the same time stations as in Q1

 $\displaystyle \mathbf{x}(t)=[\exp\{\mathbf{A}(t-t_{0})\}\mathbf{x}(t_{0})+\int^{t}_{t_{0}}[\exp\{\mathbf{A}(t-\tau)\}]\mathbf{B}\mathbf{u}(\tau)\mathrm{d}\tau$ (3.10.8)

Using the following matlab's code to compute the solution

 A = [0 1 0 0;-10.06 0 0.06 0;0 0 0 1;0.03 0 -10.03 0]; xt0 = [0;-2;0;1]; t =0:0.035:7; xt = zeros(4,length(t)); % xt = exp(A*t)*xt0; for i = 1 : length(t) xt(:,i) = exp(A*t(i))*xt0; end plot(t,xt(1,:),'-',t,xt(3,:),'.') 

3.1

Plot $\displaystyle \theta_{1}(t)$ and $\displaystyle \theta_{2}(t)$ from Q1

3.2

Plot $\displaystyle \theta_{1}(t)$ and $\displaystyle \theta_{2}(t)$ from Q2

## R*3.11 System of Coupled First Order Linear ODE with Constant Coefficients(SC-L1-ODE-CC)

### Given

 $\displaystyle \frac{d}{dt} \mathbf{\Phi}(t,t_0)=\mathbf{A}\mathbf{\Phi}(t,t_0)$ (3.11.1)

 $\mathbf{\Phi}(t_0,t_0)=\mathbf{I}$ (3.11.2)

 $\mathbf{\dot{x}}(t)=\mathbf{A}(t)\mathbf{x}(t)+\mathbf{B}(t)\mathbf{u}(t)$ (3.11.3)

 $\mathbf{x}(t)=\mathbf{\Phi}(t,t_0)\mathbf{x}(t_0)+\int^t_{t_0}\mathbf{\Phi}(t,\tau)\mathbf{B}(\tau)\mathbf{u}(\tau)d\tau$ (3.11.4)

### Find

Use (3.11.1) and (3.11.2) together with (3.11.3) to show (3.11.4).

### Solution

The solution was solved first and then compared with previous solutions.


We start by rearranging equation 3.11.1 and substituting into 3.11.3,

 $\displaystyle \mathbf{A}=\frac{\dot \Phi(t,t_0)}{\Phi(t,t_0)}$

 $\mathbf{\dot{x}}(t)=\frac{\dot \Phi(t,t_0)}{\Phi(t,t_0)}\mathbf{x}(t)+\mathbf{B}(t)\mathbf{u}(t)$

Now we group the differential terms and recognized the quotient rule differentiation form,

 $\mathbf{\dot{x}}(t)\Phi(t,t_0)-\dot \Phi(t,t_0)\mathbf{x}(t)=\mathbf{B}(t)\mathbf{u}(t)\Phi(t,t_0)$

And put into the following quotent rule form,

 $\frac{d}{dx}\frac{f}{g}=\frac{f'g-fg'}{g^2}$

 $\Phi(t,t_0)^2 \left [\frac{\mathbf{\dot{x}}(t)\Phi(t,t_0)-\dot \Phi(t,t_0)\mathbf{x}(t)}{\Phi(t,t_0)^2} \right] =\mathbf{B}(t)\mathbf{u}(t)\Phi(t,t_0)$

And reduced to,

 $\Phi(t,t_0)^2 \left [\frac{\mathbf{x}(t)}{\Phi(t,t_0)} \right]' =\mathbf{B}(t)\mathbf{u}(t)\Phi(t,t_0)$

Now we integrate both sides and evaluate the left side integral

 $\Phi(t,t_0)^2 \int_{t_0}^{t}{\left [\frac{\mathbf{x}(t)}{\Phi(t,t_0)} \right]'}dt =\int_{t_0}^{t}{\mathbf{B}(\tau)\mathbf{u}(\tau)\Phi(\tau,t_0)}d\tau$

 $\Phi(t,t_0)^2 \left [\frac{\mathbf{x}(t)}{\Phi(t,t_0)}-\frac{\mathbf{x}(t_0)}{\Phi(t_0,t_0)} \right] =\int_{t_0}^{t}{\mathbf{B}(\tau)\mathbf{u}(\tau)\Phi(\tau,t_0)}d\tau$

Applying 3.11.2 and distributing the first term we have,

 $\mathbf{x}(t)\Phi(t,t_0)-\mathbf{x}(t_0)\Phi(t,t_0)^2 =\int_{t_0}^{t}{\mathbf{B}(\tau)\mathbf{u}(\tau)\Phi(\tau,t_0)}d\tau$

 $\mathbf{x}(t)=\mathbf{x}(t_0)\Phi(t,t_0)+\int_{t_0}^{t}{\mathbf{B}(\tau)\mathbf{u}(\tau)\Phi(t,\tau)}d\tau$

 $\mathbf{x}(t)=\Phi(t,t_0) \mathbf{x}(t_0)+\int_{t_0}^{t}{\Phi(t,\tau) \mathbf{B}(\tau)\mathbf{u}(\tau)}d\tau$

## R*3.12-Transform to the form of SC-L1ODE-CV

### Given

 $\displaystyle \dot{\Phi }=\omega$ (3.12.1)
 $\displaystyle \dot{\omega }=-\frac{1}{\tau }$ (3.12.2)
 $\displaystyle \dot{\delta }=u$ (3.12.3)
 $\displaystyle \dot{\mathbf{x}}(t)=\mathbf{A}(t)\mathbf{x}(t)+\mathbf{B}(t)\mathbf{u}(t)$ (3.12.4)

### Find

Put 3.12.1-3.12.3 in the form of SC-L1ODE-CV as in 3.12.4 with A,B being constant matrices.

### Solution

Let:

 $\displaystyle \dot{\mathbf{x}}(t)=[\dot{\phi }\, \,\, \dot{\omega }\, \,\, \dot{\delta }]^{T}$ (3.12.5)

 $\displaystyle \mathbf{x}(t)=[\phi \, \,\, \omega \, \, \, \delta ]^{T}$ (3.12.6)

 $\displaystyle \mathbf{u}(t)=[u]$ (3.12.7)

 $\displaystyle \Rightarrow \mathbf{A}(t)=\begin{bmatrix} 0 & 1 &0 \\ 0 & 1/\tau &Q/\tau \\ 0 & 0 & 0 \end{bmatrix}$ (3.12.8)

 $\displaystyle \Rightarrow \mathbf{B}(t)=\begin{bmatrix} 0\\ 0\\ 1 \end{bmatrix}$ (3.12.9)

So

 $\displaystyle \begin{bmatrix} \dot{\phi }\\ \dot{\omega}\\ \dot{\delta } \end{bmatrix}=\begin{bmatrix} 0 & 1 &0 \\ 0 & 1/\tau &Q/\tau \\ 0 & 0 & 0 \end{bmatrix}\begin{bmatrix} \phi \\ \omega \\ \delta \end{bmatrix}+\begin{bmatrix} 0\\ 0\\ 1 \end{bmatrix}\left [ u \right ]$ (3.12.10)
This problem is sovled by ourselves


## R*3.13 Derivation and Verification of 2nd Exactness Test for a N2-ODE

### Given

1st relation in 2nd exactness condition for N2-ODEs

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

2st relation in 2nd exactness condition for N2-ODEs

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

N2-ODE equation for verification,

 $\displaystyle x\left( y^{\prime} \right)^2 + yy^{\prime} + \left( xy \right) y^{''} = 0$ (3.13.3)

### Find

1. Derive the Eq. (3.13.2) 2nd relation in the 2nd exactness condition.
2. Derive the Eq. (3.13.1) 1st relation in the 2nd exactness condition.
3. Verify that the Eq. (3.13.3) satisfies the 1st and 2nd relations in the 2nd exactness condition.

### Solution

1. Derivation of the 2nd relation in the 2nd exactness condition

From Eq. (3) p. 16-4 and (2) p. 7-3

 $\displaystyle g(x,y,p) = \phi_x +\phi_yp$ $\qquad \text{and} \qquad$ $\displaystyle p(x) = \, y'(x)$ (3.13.4)

If we differentiate Eq. 3.13.4 with respect to p, we obtain

 $\displaystyle g_p = \phi_{xp} + \phi_y + p\phi_{yp}$ (3.13.5)

One more differentiation with respect to p, we obtain

 $\displaystyle g_{pp} = \phi_{xpp} + 2\phi_{yp} + \phi_{ypp} p$ (3.13.6)

Substituting the $\displaystyle f :=\phi_p$ into the Eq. 3.13.6,

 $\displaystyle g_{pp} = f_{xp} + 2 f_{y} + f_{yp} p$ (3.13.7)

2. Derivation of the 1nd relation in the 2nd exactness condition

i. From the relation for the symmetry of mixed 2nd partial derivatives Eq. (1) p. 17-3

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

 $\displaystyle ( \phi_{x} )_{p} =( \phi_{p})_{x}$ (3.13.8)
 \displaystyle \begin{align} ( g - \phi_y p )_{p} &= f_x \\ g_p -\phi_{yp} p- \phi_y &= f_x \\ g_p - f_y p - \phi_y &= f_x \end{align} (3.13.9)

We can get $\displaystyle \phi_y$ with rearranging,

 $\displaystyle \phi_y = g_p - f_y p - f_x$ (3.13.10)

Differentiating $\displaystyle \phi_y$ with respect to x,

 $\displaystyle ( \phi_y )_x = g_{px} - f_{yx} p - f_{xx}$ (3.13.11)

ii. From the other relation for the symmetry of mixed 2nd partial derivatives Eq. (1) p. 17-3

$\displaystyle (\phi_{y})_{p} =( \phi_{p} )_{y}$ and $\displaystyle f :=\phi_p$

Also

 \displaystyle \begin{align} g :=&\phi_x + \phi_y p \\ \phi_y=& \left( \frac {g-\phi_x}{p} \right) \end{align} (3.13.12)

Combining them together, we get

 \displaystyle \begin{align} \left( \frac{g-\phi_x}{p} \right)_{p} &= f_{y} \\ -\frac{g-\phi_x}{p^2} + \frac{g_p - \phi_{xp}}{p} &= f_y \\ -\frac{g-\phi_x}{p^2} + \frac{g_p - f_{x}}{p} &= f_y \end{align} (3.13.13)

We can get $\displaystyle \phi_x$ with rearranging the equation above,

 $\displaystyle \phi_x = g - p \left( g_p - f_x \right) + p^2 f_y$ (3.13.14)

Differentiating $\displaystyle \phi_x$ with respect to y,

 $\displaystyle (\phi_x)_y = g_y - p (g_{py} - f_{xy}) + p^2 f_{yy}$ (3.13.15)

iii. From the last relation for the symmetry of mixed 2nd partial derivatives Eq. (1) p. 17-3

$\displaystyle (\phi_{x})_{y} =( \phi_{y} )_{x}$

If we substitute Eq 3.13.11 and Eq.3.13.15 into equity given above, we obtain

 $\displaystyle g_y - p (g_{py} - f_{xy}) + p^2 f_{yy} = g_{px} - f_{yx} p - f_{xx}$ (3.13.16)

Rearraning the terms on both sides, we get

 $\displaystyle f_{xx} + 2p f_{xy} + p^2 f_{yy} = g_{xp} + p g_{yp} - g_y$ (3.13.17)

3. Verification of 2nd Exactness Conditions

From (1) 16-6:

$\displaystyle x(y')^2+yy'+(xy)y''=0$

From (2) 16-6:

$\displaystyle g(x,y,y')=x(y')^2+yy' = x p^2 + y p$

From (3) 16-6:

$\displaystyle f(x,y,y')=xy$

Therefore, it satisfies the 1st exactness condition.

For 1nd relation in the 2nd exactness condition,

 \displaystyle \begin{align} f_{xx} + 2p f_{xy} + p^2 f_{yy} &= g_{xp} + p g_{yp} - g_y \\ 0 + 2p (1) + p^2(0) &= 2p + p(1) - p \\ 2p &= 2p \\ \end{align} (3.13.18)

For 2nd relation in the 2nd exactness condition,

 \displaystyle \begin{align} g_{pp} &= f_{xp} + 2 f_{y} + f_{yp} p \\ 2x &= 0 + 2x + (0)p \\ 2x &= 2x \end{align} (3.13.19)

It also satisfies 2nd exactness conditions as it was showed in Eq. 3.13.18 and Eq. 3.13.19.

## R*3.14 : Search for the Solution of h(x,y)

### Given

$\displaystyle h_x + h_y p = 0$

3.14.1

where $\displaystyle p(x)= y'(x)$

### Find

Find $\displaystyle h(x,y)$

### Solution

We solved this problem on our own

 $\displaystyle h_x + h_y p = 0$ where $\displaystyle p(x)= y'(x)$ Equation 3.14.1 can be rewritten as $\displaystyle \frac {\partial h(x,y)}{\partial x}+\frac {\partial h(x,y)}{\partial y} \frac {dy}{dx} = 0$ 3.14.2 We know that equation 3.14.2 is equal to $\displaystyle \frac {d h(x,y)}{dy}$ As $\displaystyle \frac {d h(x,y)}{dy}=0 , h(x,y)$ is a function of y only. So $\displaystyle h_x=0$ Equation 3.14.1 becomes $\displaystyle h_y p=0$ 2 Solutions are possible for this equation Case (i) : $\displaystyle p = 0$ Case (ii) : $\displaystyle h_y=0$ Case (i) is trivial. So $\displaystyle h_y=0$ Since $\displaystyle h_x = h_y = 0$, $\displaystyle h = constant$

## R*3.15 : Checking for 2nd Exactness Condition

### Given

 $\displaystyle \left( 15p^4 \cos{x^2} \right) y^{''} + \left( 6xy^2 \right) y^{\prime} + \left[ -6xp^5 \sin{x^2} + 2y^3 \right] = 0$ (3.15.1)

2nd exactness conditions

 $\displaystyle f_{xx} + 2pf_{xy} + p^2 f_{fyy} = g_{xp} + p g_{yp} - g_y$ (3.15.2)
 $\displaystyle f_{xp} + pf_{yp} + 2 f_y = g_{pp}$ (3.15.3)

### Find

Check whether equation (3.15.1) satifies 2nd exactness conditions

### Solution

We solved this problem on our own

 \displaystyle \begin{align} f & = 15p^4 \cos{x^2} \\ g & = [( 6xy^2 ) y^{\prime}] + [ -6xp^5 \sin{x^2} + 2y^3 ] & = [( 6xy^2 ) p] + [ -6xp^5 \sin{x^2} + 2y^3 ] \end{align} (3.15.4)

1st Condition ( Eqn 3.15.2 )

 \displaystyle \begin{align} f_{xx} &= - 30p^4 \sin{x^2} -60p^4 x^2 \cos{x^2} \end{align} (3.15.5)
 $\displaystyle 2pf_{xy} = 0$ (3.15.6)
 $\displaystyle p^2f_{yy} = 0$ (3.15.7)

 \displaystyle \begin{align} g_{xp} &= 6y^2 - 30 p ^4 \sin{x^2} - 60x^2p^4 \cos{x^2} \end{align} (3.15.8)
 $\displaystyle g_{yp} = 12xy$ (3.15.9)
 $\displaystyle g_{y} = 12xy p + 6y^2$ (3.15.10)

Substituting all the values in Eq. (3.15.2),

 \displaystyle \begin{align} {LHS} &= - 30p^4 \sin{x^2} -60p^4 x^2 \cos{x^2} \end{align}  (3.15.11)
 \displaystyle \begin{align} {RHS} &= 6y^2 - 30 p ^4 \sin{x^2} - 60x^2p^4 \cos{x^2} + p \left( 12xy \right) - 12xy y^{\prime} - 6y^2 \\ &= - 30 p ^4 \sin{x^2} - 60p^4x^2 \cos{x^2} \end{align}  (3.15.12)
Since LHS ( Eqn 3.15.11 ) = RHS ( Eqn 3.15.12), 1st condition is satisfied.


2nd ondition ( Eqn 3.15.3 )

 \displaystyle \begin{align} f_{xp} &= -120p^3 x \sin{x^2} \end{align} (3.15.13)

 \displaystyle \begin{align} f_{yp} &= 0 \end{align} (3.15.14)

 \displaystyle \begin{align} f_{y} &= 0 \end{align} (3.15.15)

 $\displaystyle g_{pp} = -120xp^3 \sin{x^2}$ (3.15.16)

Substituting all the values in Eqn 3.15.3

 \displaystyle \begin{align} LHS &= -120p^3 x \sin{x^2} \end{align}  (3.15.17)
 \displaystyle \begin{align} RHS &= -120p^3 x \sin{x^2} \end{align}  (3.15.18)

Since LHS ( Eqn 3.15.17 ) = RHS ( Eqn 3.15.18 ), the 2nd condition is satisfied.

Thus the 2nd exactness condition is verified.

## R*3.16 : Finish the Story Assuming 2nd Solution

### Given

 $\displaystyle h_y y'+h_x=(6xy^2)y' + 2y^3$ (3.16.1)

The solution discussed in class :

 $\displaystyle h_x=2y^3$ (3.16.2)

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

so:

 $\displaystyle h_{y}=6y^2x+k_1'(y)$ As $\displaystyle k_1'(y)=0,k_1(y)=k_1$ (3.16.4)

So $\displaystyle h_y = 6y^2x$

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

We know that

 $\displaystyle \phi\ (x,y,p)=2xy^3+k_1+3p^5cos x^2=k_2$ (3.16.6)

then

 $\displaystyle \phi\ (x,y,p)=2xy^3+3p^5cos x^2= \underbrace{k_2-k_1}_{\displaystyle k_3}$ (3.16.7)

### Find

Finish the story assuming $\displaystyle h_y y' = 2y^3$

### Solution

 We solved this problem on our own


The 2nd solution assuming $\displaystyle h_y y' = 2y^3$

 $\displaystyle h_y \frac {dy}{dx} = 2 y^3$ (3.16.8)

 $\displaystyle h_y dy = 2 y^3 dx$ (3.16.9)

Integrating,we get

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

The equation (3.16.10) is similar to equation (3.16.3)

Thus we see that assuming the 2nd solution leads us to the same result.

## R*3.17 Reynold's Transport Theorem (RTT)

### Given

 $\frac {\partial \rho}{\partial{x_i}}u_i + \rho \frac{\partial u_i}{\partial x_i}= \frac{\partial}{\partial x_i}(\rho u_i)$ (3.17.1)

 $\frac {\partial \rho}{\partial t} + {\rm div}{\rho \mathbf u}= 0$ (3.17.2)

### Find

Show

 $\displaystyle \frac{D}{Dt}\int _{\beta_t}^{}{\rho \mathbf u \beta_t}=\int _{\beta_t}^{}{\rho \frac{D \mathbf u}{Dt}d \beta_t}$

### Solution

We solved this problem ourselves.


From the Reynold's Transport Theroem, we know

 $\frac{D}{Dt}\int_{\beta_t}f(x,t)\,d\beta_t=\int_{\beta_t}\left[\frac{\partial f}{\partial t}+{\rm div}(f\mathbf u)\right]\,d\beta_t \ne 0$ (3.17.3)

From Eq(2) p19-10,

 $f(x,t)=\rho(x,t)\,u_i(x,t)$ (3.17.4)

We now subsitute 3.17.4 into 3.17.3,

 $\frac{D}{Dt}\int_{\beta_t}\rho(x,t)\,u_i(x,t)\,d\beta_t=\int_{\beta_t}\left[\frac{\partial (\rho \,u)}{\partial t}+{\rm div}((\rho(x,t)\,u_i(x,t))\mathbf u)\right]\,d\beta_t \ne 0$

And now subsitute in 3.17.1,

 $\frac{D}{Dt}\int_{\beta_t}\rho\,u\,d\beta_t=\int_{\beta_t}\left[\frac {\partial \rho}{\partial{t}}u + \rho \frac{\partial u}{\partial t}+{\rm div}((\rho \,u)\mathbf u)\right]\,d\beta_t \ne 0$

Now we apply 3.17.2 to eliminate terms,

 $\frac{D}{Dt}\int_{\beta_t}\rho\,u\,d\beta_t=\int_{\beta_t}{} \rho \frac {\partial u}{\partial t} d \beta_t$

 $\frac{D}{Dt}\int_{\beta_t}\rho\,u\,d\beta_t=\int_{\beta_t}{} \rho \frac {Du}{Dt} d \beta_t$

## R*3.18 Obtain 1-Dimensional case from Reynolds Transport Theorem

### Given

 $\displaystyle \frac{\mathrm{d} }{\mathrm{d} t}\int_{s=a(t)}^{s=b(t)}f(t,s)ds=f(t,b(t))\frac{\mathrm{d} b(t)}{\mathrm{d} t}-f(t,a(t))\frac{\mathrm{d} a(t)}{\mathrm{d} t}+\int_{s=a(t)}^{s=b(t)}\frac{\partial f(t,s)}{\partial t}ds$ (3.18.1)

 $\displaystyle \frac{\mathrm{D} }{\mathrm{D} t}\int _{\mathbf{B_{t}}}f(x,t)d\mathbf{B_{t}}=\int _{\mathbf{B_{t}}}\frac{\partial f}{\partial t}d\mathbf{B_{t}}+\int _{\partial \mathbf{B}_{t}}\mathbf{n}\cdot (f\mathbf{u})d(\partial \mathbf{B}_{t})$ (3.18.2)

### Find

Obtain 3.18.1 from 3.18.2

### Solution

We solved this problem on our own.


In 1-D case, $\displaystyle \mathcal{B}_{t} = s$, thus, we can get

 $\displaystyle \frac{D}{Dt}\int_{\mathcal{B}_t}f(x,t)\mathrm{d}\mathcal{B}_{t}=\frac{\mathrm{d} }{\mathrm{d} t}\int_{s=a(t)}^{s=b(t)}f(t,s)ds$ (3.18.1)

 $\displaystyle \int_{\mathcal{B}_{t}}\frac{\partial f}{\partial f}\mathrm{d}\mathcal{B}_{t}=\int_{s=a(t)}^{s=b(t)}\frac{\partial f(t,s)}{\partial t}\mathrm{d}s$ (3.18.2)

From Reynolds Transport Theorem(RTT)

 $\displaystyle \frac{D}{Dt}\int_{\mathcal{B}_t}f(x,t)\mathrm{d}\mathcal{B}_{t}=\int_{\mathcal{B}_{t}}[\frac{\partial f}{\partial t}+div(f\mathbf{u})]\mathrm{d}\mathcal{B}_{t} \neq 0$ (3.18.3)

We can get equation (3.18.4)

 $\displaystyle \int_{\partial \mathcal{B}_{t}}\mathbf{n}(f\mathbf{u})\mathrm{d}\partial \mathcal{B}_{t}=\int_{\mathcal{B}_{t}}div(f\mathbf{u})\mathrm{d}\mathcal{B}_{t}=\int_{s}div(fu)\mathrm{d}s=\int^{b(t)}_{a(t)}\frac{\partial(fu)}{\partial s}\mathrm{d}s=(fu)|^{b(t)}_{a(t)}$ (3.18.4)

 $\displaystyle (fu)|_{a(t)}^{b(t)}=[f(t,s)\frac{\mathrm{d}s}{\mathrm{d}t}]|_{a(t)}^{b(t)}=f(t,b(t))\frac{\mathrm{d}b(t)}{\mathrm{d}t}-f(t,a(t))\frac{\mathrm{d}a(t)}{\mathrm{d}t}$ (3.18.5)

Thus,we can get the equation(3.18.1).

## Contributing Members

 Team Contribution Table Problem Number Lecture(Mtg) Assigned To Solved By Signature R3.1 Mtg 13-3 Anderson, Robert Anderson, Robert Robert Anderson 18:23, 5 October 2011 (UTC) R*3.2 Mtg 13-4 Ismail Ismail Ismail H. Sahin 09:44, 5 October 2011 (UTC) R*3.3 Mtg 13-4 Ismail Ismail Ismail H. Sahin 09:47, 5 October 2011 (UTC) R*3.4 Mtg 13-5 Chao Yang Chao Yang Chao Yang 10:47, 3 October 2011 (UTC) R*3.5 Mtg 14-2 YungSheng Chang YungSheng Chang YungSheng Chang 02:21, 4 October 2011 (UTC) R*3.6 Mtg 14-6 Anderson, Robert Anderson, Robert Robert Anderson 22:43, 4 October 2011 (UTC) R*3.7 Mtg 15-1 YungSheng Chang YungSheng Chang YungSheng Chang 14:07, 4 October 2011 (UTC) R*3.8 Mtg 15-3 YungSheng Chang YungSheng Chang YungSheng Chang 14:55, 4 October 2011 (UTC) R*3.9 Mtg 15-4 Chao Yang Chao Yang Chao Yang 11:47, 3 October 2011 (UTC) R3.10 Mtg 15-5 YungSheng Chang YungSheng Chang YungSheng Chang 18:11, 5 October 2011 (UTC) R*3.11 Mtg 16-1 Anderson, Robert Anderson, Robert Robert Anderson 13:51, 5 October 2011 (UTC) R*3.12 Mtg 16-3 Chao Yang Chao Yang Chao Yang 12:47, 3 October 2011 (UTC) R*3.13 Mtg 16-6 Ismail Ismail Ismail H. Sahin 09:50, 5 October 2011 (UTC) R*3.14 Mtg 18-1 Prashant Gopichandran Prashant Gopichandran Prashant Gopichandran 17:41, 5 October 2011 (UTC) R*3.15 Mtg 18-3 Prashant Gopichandran Prashant Gopichandran Prashant Gopichandran 17:41, 5 October 2011 (UTC) R*3.16 Mtg 19-2 Prashant Gopichandran Prashant Gopichandran Prashant Gopichandran 17:41, 5 October 2011 (UTC) R*3.17 Mtg 19-10 Anderson, Robert Anderson, Robert Robert Anderson 16:34, 5 October 2011 (UTC) R*3.18 Mtg 19-12 YungSheng Chang YungSheng Chang YungSheng Chang 19:35, 5 October 2011 (UTC)