User:Egm6321.f12.team5/Report 3

= Report 3, Team 5 =

Given
An L1 - ODE - VC, represented by the following two equations. (From lecture notes Sec11.)


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

$$P(x)\,y' + Q(x)\,y = R(x)$$ (3.1.1)
 * style="width:95%" |
 * 
 * }

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

$$y' + \frac{Q(x)}{P(x)} = \frac{R(x)}{P(x)}$$ (3.1.2)
 * style="width:95%" |
 * 
 * }

Find
Show that the integration constant $$  k_1   $$ in the following equation is not necessary
 * {| style="width:100%" border="0"

$$h(x) = \exp [ \int^x a_0(s) ds + k_1]$$ (3.1.3)
 * style="width:95%" |
 * 
 * }

and the integration constant $$   k_2   $$ in the following equation is necessary.
 * {| style="width:100%" border="0"

$$y(x) = \frac{1}{h(x)}[ \int^x h(s) b(s) ds + k_2]$$ (3.1.4)
 * style="width:95%" |
 * 
 * }

(The problem was restated from lecture notes Sec12.)

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

The Equation (3.1.3) can be re- written as,


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

$$h(x) = \exp[\int^x a_0(s) ds] \exp[k_1]$$ (3.1.5)
 * style="width:95%" |
 * 
 * }

as


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

$$\exp[a+b] = \exp[a]\exp[b]$$ (Rule 1)
 * style="width:95%" |
 * 
 * }

Substituting the expression for $$ h(x) $$ obtained from Equation (3.1.5) into the Equation (3.1.4)


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

$$y(x) = \frac{1}{\exp[\int^x a_0(s) ds] \exp[k_1]}[ \int^x \exp[\int^x a_0(s) ds] \exp[k_1] b(s) ds + k_2]$$ (3.1.6)
 * style="width:95%" |
 * 
 * }

As $$ k_1 $$ is a constant, we can take it out of the integral.


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

$$y(x) = \frac{1}{\exp[\int^x a_0(s) ds] \exp[k_1]} [ \exp[k_1] \int^x \exp[\int^x a_0(s) ds] b(s) ds + k_2]$$ (3.1.7)
 * style="width:95%" |
 * 
 * }

Now dividing both the terms inside the parentheses by $$ \exp[k_1] $$


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

$$y(x) = \frac{1}{\exp[\int^x a_0(s) ds]} [ \int^x \exp[\int^x a_0(s) ds] b(s) ds + \frac{k_2}{\exp[k_1]}]$$ (3.1.8)
 * style="width:95%" |
 * 
 * }

We can term a new constant $$ k_3 $$ which is equal to,


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

$$k_3 = \frac{k_2}{\exp[k_1]}]$$ (3.1.9)
 * style="width:95%" |
 * 
 * }

As $$ k_1, k_2 $$ and $$ k_3 $$ are constants, $$ k_3 $$ can be directly incorporated into Equation (3.1.4) as $$ k_2 $$, thus eliminating the need of $$ k_1 $$ in Equation (3.1.3). So only $$ k_2 $$ is necessary in Equation (3.1.4).

Given
The form of solution in King's book p.512,
 * {| style="width:100%" border="0"

$$y(x)=Ay_H(x)+y_P(x)$$ (3.2.1)
 * style="width:95%" |
 * 
 * }

(From lecture notes Sec12, Pg 2.)
 * {| style="width:100%" border="0"

$$a_1(x)y^{(1)}+a_0(x)y^{(0)}=b(x)$$ (3.2.2)
 * style="width:95%" |
 * 
 * }


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

$$h(x)=\exp[\int^xa_0(s)ds+k_1]$$ (3.2.3)
 * style="width:95%" |
 * 
 * }


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

$$y(x)=\frac{1}{h(x)}\left[\int^xh(s)b(s)ds+k_2\right]$$ (3.2.4)
 * style="width:95%" |
 * 
 * }

Find
Show that the solution of (3.2.2) in (3.2.4) agrees with (3.2.1).

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions. Apply the equation (3.2.3) to equation (3.2.4):
 * {| style="width:100%" border="0"

$$ \begin{align} y(x)&=\frac{1}{\exp[\int^xa_0(s)ds+k_1]}\left[\int^x\exp[\int^xa_0(s)ds+k_1]b(s)ds+k_2\right]\\\\ &=\exp[-\int^xa_0(s)ds]\exp[-k_1]\left[\exp[k_1]\int^x\exp[\int^xa_0(s)ds]b(s)ds+k_2\right]\\\\ &=\exp[-\int^xa_0(s)ds]\exp[-k_1]k_2+\exp[-\int^xa_0(s)ds](\int^x\exp[\int^xa_0(s)ds]b(s)ds) \end{align} $$     (3.2.5)
 * style="width:95%" |
 * 
 * }

So compare the result with (3.2.1) to find A, $$y_H(x)$$, $$y_P(x)$$:
 * {| style="width:100%" border="0"

$$A=k_2\exp[-k_1]$$ (3.2.6)
 * style="width:95%" |
 * 
 * }


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

$$y_H(x)=\exp[-\int^xa_0(s)ds]$$ (3.2.7)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$y_P(x)=\exp[-\int^xa_0(s)ds](\int^x\exp[\int^xa_0(s)ds]b(s)ds)$$ (3.2.8) Thus, the solution of (3.2.2) in (3.2.4) agrees with (3.2.1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Given
(From lecture notes Sec12, Pg 2.)

Use the same information as in R*3.2's Given section.

Find
Instead of identifying $$y_H(x)$$ as was done in R*3.2, identify it by solving the homogeneous equation,


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

$$ y' + a_0(x)y = 0 $$     (3.3.1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

By comparing the equation (3.3.1) to (2) from lecture notes Sec7, Pg 6 [shown below as equation (3.3.2)],


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

$$ M(x,y) + N(x,y)y' = 0 $$     (3.3.2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

we see that


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

$$ M(x,y) = a_0(x)y $$     (3.3.3)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ N(x,y) = 1 $$     (3.3.4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ M_y(x,y) = a_0(x) $$     (3.3.5)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ N_x(x,y) = 0 $$     (3.3.6)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

(where '$$(x)$$' has been omitted in some cases for brevity.)

Since $$y$$ is a function of $$x$$ only, we can use equations (2) and (4) from lecture notes Sec11, Pg 2 [shown below as equations (3.3.7) and (3.3.8)] to solve for the integrating factor $$h(x)$$.


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

$$ \frac{h_x}{h} = -\frac{1}{N}(N_x - M_y) =: n(x) $$     (3.3.7)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ h(x) = exp\left[\int^x n(s)ds + k\right] $$     (3.3.8)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substituting $$N, N_x, and M_y$$ into (3.3.7) yields,


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

$$ \begin{align} n(x) &= -\frac{1}{1}(0 - a_0(x)) \\ &=a_0(x) \end{align} $$     (3.3.9)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substituting for $$n(s)$$ in (3.3.8) gives $$h(x)$$ as,


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

$$ h(x) = exp\left[\int^x a_0(s)ds + k_1\right] $$     (3.3.10)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Multiplying the given equation (3.3.1) by the the integration factor ('$$(x)$$' omitted for brevity),


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

$$ \begin{align} h(y' + a_0y) &= 0 \\ hy' + ha_0y &= 0 \end{align} $$     (3.3.11)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

However, we know from equations (3.3.7) and (3.3.9) that


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

$$ \begin{align} \frac{h_x}{h} &= n \\ &= a_0 \\ h_x &= ha_0 \end{align} $$     (3.3.12)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

and since $$h_x$$ is a derivative of $$h$$ w.r.t. $$x$$,


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

$$ h_x = h' $$ (3.3.13)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

So, using equations (3.3.12) and (3.3.13), equation (3.3.11) becomes


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

$$ \begin{align} hy' + ha_0y &= 0 \\ hy' + h_xy &= 0 \\ hy' + h'y &= 0 \\ (hy)' &= 0 \end{align} $$     (3.3.14)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Equation (3.3.14) can be solved to obtain the homogeneous solution, $$y_H$$, through integration and simple rearrangement of terms.


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

$$ \begin{align} \int^x (hy)' &= \int^x 0 \\ hy &= k_2 \\ y &= \frac{k_2}{h} \\ y_H(x) &= \frac{k_2}{exp\left[\int^x a_0(s)ds + k_1\right]} \end{align} $$     (3.3.15)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Rearranging the terms of equation (3.3.15),


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

$$ \begin{align} y_H(x) &= \frac{k_2}{exp\left[\int^x a_0(s)ds + k_1\right]} \\ &= \frac{k_2}{exp[k_1]exp\left[\int^x a_0(s)ds\right]} \\ &= \frac{\displaystyle \frac{k_2}{exp[k_1]}}{exp\left[\int^x a_0(s)ds\right]} \end{align} $$     (3.3.16)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

which agrees with equations (3.2.6) and (3.2.7) of R*3.2.

Comments
Following may be an easier way to slove this problem. Since we already know $$ y'+a_0(x)y=0 $$ We can transfer the eq to $$ \frac{dy}{y}=-a_0(x)dx $$ It is easy to get the answer that $$ y_H(x)=C*exp[-\int a_0(x)dx] $$ --EGM6321.Fall2012.Team 5.Enze Zhu (talk) 15:50, 30 September 2012 (UTC)

Given
An L1 - ODE - VC, (From lecture notes Sec12.)
 * {| style="width:100%" border="0"

$$ \left[ x^4 y + 10 \right] + \frac{1}{2} x^2 y' = 0 $$     (3.4.1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find
Determine whether the equation is exact, if not find the integrating factor $$ h(x) $$ to make the equation exact

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions. Since

$$ M=x^4*y, N=\frac{x^2}{2} $$ We can get that

$$ M_y=x^4\neq N_x=x $$

So Eq 3.4.1 is not exact now and we need to find an integrating factor h(x) to make the equation exact.

We already know that


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

$$ \frac{h_x}{h}=-\frac{1}{N(x,y)}(N_x-M_y)=:n(x) $$ (3.4.2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solving the equation we can get:
 * {| style="width:100%" border="0"

$$ h(x)=exp[\int ^xn(s)ds+k]$$ (3.4.3)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ h(x)=exp[2\int ^x(s^2-\frac{1}{s})ds+k] $$ (3.4.4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ h(x)=exp[2(\frac{1}{3}x^3-lnx)+k] $$ (3.4.5)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Given
A class of N1-ODEs of the form:
 * {| style="width:100%" border="0"

$$ \overline{b}(x,y)c(y)y'+a(x)\overline{c}(x,y)=0 $$     (3.5.1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$ \overline{b}(x,y):=\int ^xb(s)ds+k_1(y) $$     (3.5.2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \overline{c}(x,y):=\int ^xc(s)ds+k_2(y) $$     (3.5.3)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Where are arbitrary functions.

This problem was restated from sec. 13:

Find
1.Show that the N1-ODE 3.5.1 satisfies the condition that an integrating factor h(x) can be found to render it exact, only if $$ k_1(y)=d_1(constant)$$. 2.Show that Eq 3.5.1 includes (1)p.12-4
 * {| style="width:100%" border="0"

$$ M+Ny'=[a(x)y+k_2(x)]+\overline{b}y'=0 $$ (3.5.4) as a particular case.
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

1.Using Eq 3.5.2 and 3.5.3 to expand the expressions for N and M, we can get:


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

$$ N(x,y)=\overline{b}(x,y)c(y)=c(y)[\int ^xb(s)ds+k_1(y)] $$ $$ N_x=c(y)b(x) $$ (3.5.5)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ M(x,y)=a(x)\overline{c}(x,y)=a(x)[\int ^yc(s)ds+k_2(x)]$$ $$ M_y=a(x)c(y)$$ (3.5.6)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Then we can change the expression of the following equation into:


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

$$ \begin{align} -\frac{1}{N}(N_x-M_y)&=-\frac{1}{c(y)[\int ^xb(s)ds+k_1(y)]}*[c(y)b(x)-a(x)c(y)]\\\\ &=-\frac{1}{c(y)[\int ^xb(s)ds+k_1(y)]}*c(y)[b(x)-a(x)]\\\\ &=\frac{1}{[\int ^xb(s)ds+k_1(y)]}*[b(x)-a(x)] \end{align} $$     (3.5.7) Only if k1 is a constant that eq 3.5.7 is function of only x.
 * style="width:95%" |
 * <p style="text-align:right">
 * }

2. When $$ c(y)=1 $$. It means $$ \overline{c}(x,y)=y+k(x)$$

Then (1)p.13-2 can be rewritten as:


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

$$ \begin{align} \overline{b}(x,y)c(y)y'+a(x)\overline{c}(x,y)&=\overline{b}(x,y)*1*y'+a(x)*[y+k(x)]\\\\ &=\overline{b}(x,y)y'+a(x)y+a(x)k(x)\\\\ &=[a(x)y+k_2(x)]+\overline{b}(x,y)y' \end{align} $$     (3.5.8) Which is the (1)p.12-4.
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Given
Consider the following function


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

$$\underbrace{\left(\frac{1}{3}x^3+d_1 \right )(y^4)}_{\displaystyle \color{blue}{N(x,y)}}\,y' + \underbrace{(5x^3+2)\left(\frac{1}{5}y^5+\sin x + d_2 \right)}_{\displaystyle \color{blue}{M(x,y)}}=0$$ (1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

This problem was restated from sec. 13:

Find
Show that (1) either is exact, or can be made exact by the IFM. Find the integrating factor $$ h $$.

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

Showing the Equation is Exact
In order for a function to be exact, it must satisfy two exactness conditions.

1. The equation can be written as
 * {| style="width:100%" border="0"

$$M(x,y) + N(x,y)y' = 0$$ (3.6.1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From inspection of (1), we can conclude this condition is met where


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

$$M(x,y) = (5x^3+2)(\frac{1}{5}y^5+\sin x + d_2)$$ $$N(x,y) = (\frac{1}{3}x^3+d_1)(y^4)$$ (3.6.2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

2. The equation meets the Second Exactness Condition:
 * {| style="width:100%" border="0"

$$M_y(x,y)=N_x(x,y)$$ $$\frac{\partial M(x,y)}{\partial y}=\frac{\partial N(x,y)}{\partial x}$$ (3.6.3)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Get the Derivative of $$M(x,y)$$ with respect to $$y$$


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

$$\frac{\partial M(x,y)}{\partial y}=[(5x^3+2)(\frac{1}{5}y^5+\sin x + d_2)]\frac{d}{dy}$$ (3.6.4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

By applying the Product Rule $$(uv)' = u'v+uv'$$, the equation can be re-written


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

$$\frac{\partial M(x,y)}{\partial y}=(5x^3+2)\frac{d}{dy}(\frac{1}{5}y^5+\sin x + d_2)+(5x^3+2)(\frac{1}{5}y^5+\sin x + d_2)\frac{d}{dy}$$ (3.6.5)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\frac{\partial M(x,y)}{\partial y}=\cancelto{0}{(5x^3+2)}(\frac{1}{5}y^5+\sin x + d_2)+(5x^3+2)(5*\frac{1}{5}y^4+\cancelto{0}{\sin x} + \cancelto{0}{d_2})$$ (3.6.6)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\frac{\partial M(x,y)}{\partial y}=(5x^3+2)(y^4)$$ (3.6.7)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Get the Derivative of $$N(x,y)$$ with respect to $$x$$


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

$$\frac{\partial N(x,y)}{\partial x}=[(\frac{1}{3}x^3+d_1)(y^4)]\frac{d}{dx}$$ (3.6.8)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

By applying the Product Rule $$(uv)' = u'v+uv'$$, the equation can be re-written


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

$$\frac{\partial N(x,y)}{\partial x}=(\frac{1}{3}x^3+d_1)\frac{d}{dx}(y^4)+(\frac{1}{3}x^3+d_1)(y^4)\frac{d}{dx}$$ (3.6.9)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\frac{\partial N(x,y)}{\partial x}=(3*\frac{1}{3}x^2+\cancelto{0}{d_1})(y^4)+(\frac{1}{3}x^3+d_1)\cancelto{0}{(y^4)}$$ (3.6.10)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\frac{\partial N(x,y)}{\partial x}=(x^2)(y^4)$$ (3.6.10)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Evaluating the Second Exactness Condition shows that the equation is not exact.
 * {| style="width:100%" border="0"

$$\frac{\partial M(x,y)}{\partial y}=\frac{\partial N(x,y)}{\partial x}$$
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$(5x^3+2)(y^4)\neq(x^2)(y^4)$$ (3.6.11)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Since (1) is not exact, we can show that the equation can be made exact by the Integrating Factor Method.

Integrating Factor Method
From sec. 11:, supposing $$ h_y(x,y)=0$$, the integrating factor is defined as


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

$$h(x)=exp\left[\int^x n(s)ds+k \right ]$$ 11-2 (4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$\frac{h_x}{h}=- \frac{1}{N}(N_x-M_y)=: n(x)$$ 11-2 (2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Since (1) is a class of N1-ODE of the form:
 * {| style="width:100%" border="0"

$$\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$$ 13-2 (1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\underbrace{\left(\frac{1}{3}x^3+d_1 \right )(y^4)}_{\displaystyle \color{blue}{N(x,y)}}\,y' + \underbrace{(5x^3+2)\left(\frac{1}{5}y^5+\sin x + d_2 \right)}_{\displaystyle \color{blue}{M(x,y)}}=0$$ (1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Then we can re-define 11-2 (2) as
 * {| style="width:100%" border="0"

$$\frac{h_x}{h}=- \frac{1}{N}(N_x-M_y)= \underbrace {-\frac{1}{\bar b(x) \cancel {c(y)}} \left[b(x) \cancel{c(y)}-a(x) \cancel {c(y)} \right ]}_{\displaystyle \color{blue}{n(x)}}$$ 3.6.12
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$\bar b(x)= \frac{1}{3}x^3+d_1$$ 3.6.13
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$b(x)= 3*\frac{1}{3}x^2+0*d_1=x^2$$ 3.6.14
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$c(y)=y^4$$ 3.6.15
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$a(x)=5x^3+2$$ 3.6.16
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\bar c(x,y)=\frac{1}{5}y^5+sinx+d_2$$ 3.6.17
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substituting equations 3.6.13-3.5.17 back into 3.6.12, we get $$n(x)$$ which we can use to find the Integrating Factor $$ h(x) $$. Note: since $$d_1$$ will eventually go to zero once we take it's derivative, we will set $$d_1=0$$ in the remaining equations
 * {| style="width:100%" border="0"

$$n(x) = - \frac{1}{\frac{1}{3}x^2}\left[x^2-5x^3-2 \right ]$$ 3.6.18
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$h(x)=exp\left[\int^x n(s)ds+k \right ]$$ 11-2 (4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$h(x)=exp\left[\int^x - \frac{1}{\frac{1}{3}s^2}\left[s^2-5s^3-2 \right ]ds+k \right ]$$ 3.6.19
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$h(x)=exp\left[\int^x - \frac{3}{s^2}\left[s^2-5s^3-2 \right ]ds+k \right ]$$ 3.6.19
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$h(x)=exp\left[\int^x (-3+15s-2s^2)ds+k\right ]$$ 3.6.20
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$h(x)=exp\left[\int^x (\cancel{-3}+15-4s)+k\right ]$$ 3.6.21
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$h(x)=exp\left[15-4x+k\right]$$ 3.6.22
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Given

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

$$a(x)=\sin x^3$$ (3.7.1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$b(x)=\cos x$$ (3.7.2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$c(x)=\exp(2y)$$ (3.7.3)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

(From lecture notes Sec13.)

Find
1. Find a N1-ODE of the form
 * {| style="width:100%" border="0"

$$\bar b(x,y)+c(y)y'+a(x)\bar c(x,y)=0$$ (3.7.4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

that is either exact or can be made exact by IFM

2.Find the first integral
 * {| style="width:100%" border="0"

$$\phi(x,y)=k$$ (3.7.5)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions. Part 1
 * {| style="width:100%" border="0"

$$\bar b(x,y)=\int^x b(s)ds+k_1=\int^x \cos sds+k_1=\sin x+k_1$$ (3.7.6)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$\bar c(x,y)=\int^y c(s)ds+k_2(x)=\int^y \exp (2s) ds+k_2(x)=\frac{\exp (2y)}{2}+k_2(x)$$ (3.7.7)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Set k_1=k_2(x)=0, we get


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

$$ M(x,y)=\frac{\sin x^3\exp (2y)}{2}$$ (3.7.8)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ N(x,y)=\sin x\exp (2y)$$ (3.7.9)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \frac{\partial M(x,y)}{\partial y}=\frac{\partial \frac{\sin x^3\exp (2y)}{2}}{\partial y}=\sin x^3\exp (2y)$$ (3.7.10)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \frac{\partial N(x,y)}{\partial x}=\frac{\partial \sin x\exp (2y)}{\partial x}=\cos x\exp (2y)$$ (3.7.11)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \frac{\partial M(x,y)}{\partial y}\neq\frac{\partial N(x,y)}{\partial x}$$ (3.7.12) So this equation is not exact. But it can be made exact by IFM. Sec11.)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ \frac {\partial h(x,y)M(x,y)}{\partial y}=\frac {\partial h(x,y)N(x,y)}{\partial x}$$ (3.7.13) If we assume
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \frac{\partial h(x,y)}{\partial y}=0$$ (3.7.14) So we get
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ h_x=exp[\int^x-\frac{1}{N}(N_x-M_y)]=exp[\int^x-\frac{1}{\sin s}(\cos s-0)ds]=exp[-\ln(\sin x)+k_3]$$ (3.7.15) Set k_3=0, we have
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ h_x=exp[-\ln(\sin x)]=\frac{1}{\sin x}$$ (3.7.16) So the exact form of equation is
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ h_xM(x,y)+h_xN(x,y)y'=\frac{1}{\sin x}\frac{\sin x^3\exp (2y)}{2}+\frac{1}{\sin x}\sin x\exp (2y)y'=0$$ (3.7.17)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$ y'+\frac{\sin x^3}{2\sin x}=0$$ (3.7.18)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$ y'+\frac{\sin x^3}{2\sin x}=0$$ (3.7.18) From the definition, we get
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ \phi_x=M(x,y)h(x)=\frac{\partial \phi}{\partial x}$$ (3.7.19)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ \phi_y=N(x,y)h(x)=\frac{\partial \phi}{\partial y}$$ (3.7.20) The h(x)M(x,y) can be simplified to $$\frac{\sin x^3}{2\sin x}$$. By integrating, we get
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ \phi(x,y)=\int ^x M(s)h(s)ds+k_4(y)=\int ^x\frac{\sin s^3}{2\sin s}ds+k_4(y)$$ (3.7.21)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ \phi(x,y)=\int ^y N(s)h(s)ds+k_5(x)=\int ^y1ds+k_5(x)=y+k_5(x)$$ (3.7.22) From (3.7.22), we get
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \frac{\partial \phi}{\partial y}=\frac{\partial [y+k_5(x)]}{\partial y}=1=\frac{\partial k_4(y)}{\partial y}$$ (3.7.23)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

So k4(y)=y+k6 Then we get


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

$$ \phi(x,y)=\int ^x M(s)h(s)ds+k_4(x)=\int ^x\frac{\sin s^3}{2\sin s}ds+y+k_6$$ (3.7.24)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Given
Consider the following functions


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

$$\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$$ 13-2 (1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$\frac{h_y}{h}=\frac{1}{M}(N_x-M_y)=:m(y)$$ 11-3 (1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

This problem was restated from sec. 13: and sec. 11:

Find
Construct a class of N1-ODEs, which is the counterpart of (1) p.13-2, and satisfies the condition (1) p.11-3 that an integrating factor $$ h(y) $$ can be found to render it exact.

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions. For an N1-ODE to be exact, it must satisfy two conditions: 1) The equation can be written in the particular form:


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

$$M(x,y) + N(x,y)y'=0$$ 3.8.1
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From inspection of 13-2 (1), the first exactness condition is satisfied where


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

$$M(x,y)= a(x) \bar c(x,y)$$ 3.8.2
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ N(x,y)= \bar b(x,y) c(y) $$ 3.8.3
 * style="width:95%" |
 * <p style="text-align:right">
 * }

2) The equation should satisfy the 2nd Exactness Condition:
 * {| style="width:100%" border="0"

$$\bar M_y = \bar N_x$$ 3.8.4
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\bar M_y = h_y M + h M_y$$ 3.8.5
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\bar N_x= h_x N + h N_x$$ 3.8.6
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$h_x N - h_y M + h(N_x - M_y)=0$$ 3.8.7
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Expanding on the given equation,
 * {| style="width:100%" border="0"

$$\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$$ 13-2 (1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\bar b(x,y):= \int^x b(s)ds + k_1(y)$$ 13-2 (2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\bar c(x,y):= \int^x c(s)ds + k_2(x)$$ 13-3 (1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$ a(x) $$, $$ b(x) $$ , $$ c(y) $$ are arbitrary functions and $$ k_1(y) $$ , $$ k_2(x) $$  are integration coeffients.

We can find that
 * {| style="width:100%" border="0"

$$M_y(x,y)= a(x)c(y)$$ 3.8.8
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$M(x,y)= \underbrace{\left[\int^y a(s)ds + k_1(y) \right ]}_{\displaystyle\color{blue}{\bar a(x,y)}}c(y)$$ 3.8.9
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$N_x(x,y)= b(x)c(y)$$ 3.8.10
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$N(x,y)= \underbrace{\left[\int^y b(s)ds + k_2(y) \right ]}_{\displaystyle\color{blue}{\bar b(x,y)}}c(y)$$ 3.8.11
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Assuming $$k_1$$ and $$k_2$$ are constants, we can construct a counterpart of (1) p13.2 and satisfy the condition (1) p.11-3 that an integrating factor $$h(y)$$ can be found to render it exact


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

$$\frac{h_y}{h}=\frac{1}{M}(N_x-M_y)=\underbrace{\frac{1}{\bar a(x)\cancel{c(y)}} \left[a(x)\cancel{c(y)}-a(x)\cancel{c(y)}) \right ]}_{\displaystyle\color{blue}{m(y)}}$$ 3.8.12
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$h(y)=exp \left [ \int^y m(s)ds+k \right ]$$ 3.8.13
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Given
Motion of a particle in the air

The particle has mass m.

vx is its horizontal velocity. vxo :=vx(t=0).

vy is its vertical velocity. vyo :=vy(t=0).

α is the included angle between v and vx.

The magnitude of resistance is kvn, in opposite direction of v.

k, n are constants. g is acceleration of gravity.


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

$$\begin{align}v:=\left \|\mathbf{v} \right \|\\\end{align}$$
 * style="width:95%" |

(3.9.1)
 * <p style="text-align:right">
 * }

(From lecture notes sec 14)

Find
1.	Derive the equations of motion


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

$$\begin{align}m\frac{dv_x}{dt}=-kv^n\cos\alpha \\\end{align}$$ <p style="text-align:right"> (3.9.2)
 * style="width:95%" |
 * }


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

$$\begin{align}m\frac{dv_y}{dt}=-kv^n\sin\alpha-mg \\\end{align}$$ <p style="text-align:right"> (3.9.3)
 * style="width:95%" |
 * }


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

$$\begin{align}v^2=(v_x)^2+(v_y)^2 \\\end{align}$$ <p style="text-align:right"> (3.9.4)
 * style="width:95%" |
 * }


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

$$\begin{align}\tan\alpha =\frac{dy}{dx}=\frac{\frac{dy}{dt}}{\frac{dx}{dt}}=\frac{v_y}{v_x} \\\end{align}$$ <p style="text-align:right"> (3.9.5)
 * style="width:95%" |
 * }

2.	Particular case k=0: verify that y(x) is parabola

3.	Consider the case $$\begin{align}k \neq 0\\\end{align}$$, and vx0 is 0


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

$$\begin{align}m\frac{dv_y}{dt}=-k(v_y)^n\sin\alpha-mg \\\end{align}$$ <p style="text-align:right"> (3.9.3)
 * style="width:95%" |
 * }

3.1	Is this equation, for n=0, 1, 2, either exact or can be made exact using IFM? Find vy(t) and y(t) for m constant

3.2 Find vy(t) and y(t) for m=m(t)

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

Part 1
Force analysis Horizontal plane:
 * {| style="width:100%" border="0"

$$\begin{align}F_x=-kv^n\cos\alpha=ma_x=m\frac{dv_x}{dt} \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.6)
 * }

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

$$\begin{align}F_y=-kv^n\sin\alpha-mg=ma_y=m\frac{dv_y}{dt} \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.7)
 * }

So we get
 * {| style="width:100%" border="0"

$$\begin{align}m\frac{dv_x}{dt}=-kv^n\cos\alpha \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.2)
 * }


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

$$\begin{align}m\frac{dv_y}{dt}=-kv^n\sin\alpha-mg\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.3) Due to the definition of v, we get
 * }
 * {| style="width:100%" border="0"

$$\begin{align}v=\left \|\mathbf{v}\right \|=\sqrt{v_x^2+v_y^2}\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.8)
 * }

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

$$\begin{align}v=\sqrt{v_x^2+v_y^2}\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.1)
 * }

And according to chain rule, which is $$\begin{align}\frac{dg(y)}{dx}=\frac{dg(y)}{dy}\frac{dy}{dx}\\\end{align}$$


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

$$\begin{align}\tan\alpha =\frac{dy}{dx}=\frac{dy}{dt}\frac{dt}{dx}=\frac{\frac{dy}{dt}}{\frac{dx}{dt}}=\frac{v_y}{v_x} \\\end{align}$$ <p style="text-align:right"> (3.9.5)
 * style="width:95%" |
 * }

Part 2
As k=0, we get
 * {| style="width:100%" border="0"

$$\begin{align}m\frac{dv_x}{dt}=0 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.9)
 * }
 * {| style="width:100%" border="0"

$$\begin{align}m\frac{dv_y}{dt}=-mg\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.10) Then we get
 * }
 * {| style="width:100%" border="0"

$$\begin{align}\frac{dv_x}{dt}=a_x=0 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.11)
 * }
 * {| style="width:100%" border="0"

$$\begin{align}\frac{dv_y}{dt}=a_y=-g\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.12) If we substitute
 * }
 * {| style="width:100%" border="0"

$$\begin{align}v_x(t=0)=v_1 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.13)
 * }
 * {| style="width:100%" border="0"

$$\begin{align}v_y(t=0)=v_2\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.14) Initiating (3.9.11) and (3.9.12), and we know the original conditions as shown in (3.9.13) and (3.9.14)
 * }


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

$$\begin{align}v_x=v_1 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.15)
 * }
 * {| style="width:100%" border="0"

$$\begin{align}v_y=v_2-gt\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.16) Initiating (3.9.15) and (3.9.16)
 * }


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

$$\begin{align}x=v_1t+x_0 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.17)
 * }
 * {| style="width:100%" border="0"

$$\begin{align}y=v_2t-\frac{gt^2}{2}+y_0\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.18) From (3.9.17) and (3.9.18),we get the relationship between x and y
 * }
 * {| style="width:100%" border="0"

$$\begin{align}t=\frac{x-x_0}{v_1}\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.19) Substitute t in (3.9.18)
 * }


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

$$\begin{align}y=\frac{x-x_0}{v_1}v_2-\frac{g(\frac{x-x_0}{v_1})^2}{2}+y_0\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.20) Which can change form into
 * }
 * {| style="width:100%" border="0"

$$\begin{align}y=ax^2+bx+c\\\end{align}$$
 * style="width:95%" |


 * }

So y(x) is parabola

Part 3
(3.9.3) is


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

$$\begin{align}m\frac{dv_y}{dt}=-kv_y^n-mg \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.3) which can be changed into the following equation
 * }
 * {| style="width:100%" border="0"

$$\begin{align}kv_y^n+mg+m\frac{dv_y}{dt}=0 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.21)
 * }

substitute vy to v to simplify the equation

$$\begin{align}M(t,v):= kv^n+mg\\\end{align}$$

$$\begin{align}N(t,v):=m\\\end{align}$$

$$\begin{align}\dot v=\frac{dv_y}{dt}\\\end{align}$$

So we get


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

$$\begin{align}M(t,v)+N(t,v)\dot v=0 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.22) So it satisfies the First Exactness Condition. The second is satisfied if
 * }


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

$$\begin{align}\frac{\partial M(t,v)}{\partial v}=\frac{\partial N(t,v)}{\partial t} \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.23) So
 * }


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

$$\begin{align}nkv^{n-1}=\frac{\partial m}{\partial t} \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.24)
 * }

problem 3.1
When m is constant, $$\begin{align}\frac{\partial m}{\partial t}=0 \\\end{align}$$ $$\begin{align}nkv^{n-1}\neq 0 \\\end{align}$$

So


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

$$\begin{align}nkv^{n-1}\neq\frac{\partial m}{\partial t} \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.25)
 * }

Therefore the Second Exactness Condition is not satisfied. By multiplying an integrating factor h(t,v), we can make it exact.

So


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

$$\begin{align}h(t,v)M(t,v)+h(t,v)N(t,v)\dot v=0 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.26)
 * }
 * {| style="width:100%" border="0"

$$\begin{align}h(t,v)kv^n+mgh(t,v)+mh(t,v)\frac{dv}{dt}=0 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.27)
 * }

h(t,v) consists of 2 arguments, so it is difficult to find a solution. According to class notes, there are 2 cases to simplify the problem.(From lecture notes Sec11.)

$$\begin{align}h_t:=\frac{\partial h(t,v)}{\partial t} \\\end{align}$$

$$\begin{align}h_v:=\frac{\partial h(t,v)}{\partial v} \\\end{align}$$

$$\begin{align}M_v:=\frac{\partial M(t,v)}{\partial v} \\\end{align}$$

$$\begin{align}N_t:=\frac{\partial N(t,v)}{\partial t} \\\end{align}$$

case 1

$$\begin{align}\frac{\partial h(t,v)}{\partial t}=0 \\\end{align}$$

So


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

$$\begin{align}\frac{h_v}{h}=\frac{1}{M}(N_t-M_v) \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.28)
 * }


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

$$\begin{align}\frac{h_v}{h}=\frac{1}{kv^n+mg}(\frac{dm}{dt}-knv^{n-1}) \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.29)
 * }

If we substitute $$\begin{align}\frac{dm}{dt}=m' \\\end{align}$$, so we get


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

$$\begin{align}h(v)=exp[\int^{v}\frac{1}{ks^n+mg}( m'-kns^{n-1})ds+k_1] \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.30)
 * }

case 2

$$\begin{align}\frac{\partial h(t,v)}{\partial v}=0 \\\end{align}$$

So


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

$$\begin{align}\frac{h_t}{h}=-\frac{1}{N}(N_t-M_v) \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.31)
 * }


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

$$\begin{align}\frac{h_t}{h}=-\frac{1}{m}(\frac{dm}{dt}-knv^{n-1}) \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.32)
 * }

So


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

$$\begin{align}h(t)=exp[\int^{t}-\frac{1}{N}(N_t-M_v)ds+k_2] \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.33)
 * }

We should not use case 2 in this case, for the equation
 * {| style="width:100%" border="0"

$$\begin{align}\frac{h_t}{h}=-\frac{1}{N}(N_t-M_v) \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.35)
 * }

required that the right side of the equation contain only one variable t. However M_v consists of variable v. Though we can use t to represent v, it makes the equation complex. Thus we apply case 1 to the question.

When n=0, we get


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

$$\begin{align}m\frac{dv}{dt}=-k-mg \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.36)
 * }


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

$$\begin{align}v(t)=\int^t \frac{-k-mg}{m}ds+v_2=-\frac{k+mg}{m}t+v_2 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.37)
 * }


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

$$\begin{align}y(t)=\int^t[-\frac{k+mg}{m}s+v_2]ds+y_0=-\frac{k+mg}{2m}t^2+v_2t+y_0 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.38)
 * }

When n=1, we get


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

$$\begin{align}m\frac{dv}{dt}=-kv-mg \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.39)
 * }


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

$$\begin{align}\frac{dv}{v+\frac{gm}{k}}=-\frac{k}{m}dt \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.40)
 * }


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

$$\begin{align}\ln(v+\frac{gm}{k})=-\frac{k}{m}t +k_1\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.41)
 * }

If we set $$\begin{align}e^k_1=C_1\\\end{align}$$, we get


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

$$\begin{align}v(t)=C_1exp^{(-\frac{kt}{m})}-\frac{gm}{k} \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.42)
 * }


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

$$\begin{align}y(t)=\int^t v(s)ds+C_2=\int^t [C_1exp^{(-\frac{ks}{m})}-\frac{gm}{k}]ds+C_2=-C_1\frac{m}{k}exp^{(-\frac{kt}{m})}-\frac{gm}{k}t +C_2\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.43) When n=2, we get
 * }


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

$$\begin{align}m\frac{dv}{dt}=-kv^2-mg \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.44)
 * }


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

$$\begin{align}\frac{dv}{kv^2+mg}=-\frac{1}{m}dt \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.45)
 * }


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

$$\begin{align}\frac{dv}{\frac{kv^2}{mg}+1}=-gdt \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.46)
 * }


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

$$\begin{align}\frac{\sqrt{m}\sqrt{g}}{\sqrt{k}}\arctan{\frac{\sqrt{k}v}{\sqrt{m}\sqrt{g}}}=-gt+C_4 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.47)
 * }

So we get


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

$$\begin{align}v(t)=\frac{\sqrt g \sqrt m\tan(\frac{C_4\sqrt g\sqrt km-\sqrt g\sqrt kt}{\sqrt m})}{\sqrt k}\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.48)
 * }


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

$$\begin{align}y(t)=\int^t v(s)ds+C_5=\frac{2m\log(\cos(\frac{\sqrt g\sqrt k(C_4m-t)}{\sqrt m}))}{t-C_4m}+C_5\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.49)
 * }

=
problem 3.2

=
According to case 2, if we assume

$$\begin{align}\frac{\partial h(t,v)}{\partial v}=0 \\\end{align}$$

So


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

$$\begin{align}\frac{h_t}{h}=-\frac{1}{N}(N_t-M_v) \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.31)
 * }


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

$$\begin{align}\frac{h_t}{h}=-\frac{1}{m}(\frac{dm}{dt}-knv^{n-1}) \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.32)
 * }

So


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

$$\begin{align}h(t)=exp[\int^{t}[-\frac{1}{N}(N_t-M_v)]ds+k_2] \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.33)
 * }

If a equation in the following form

$$\begin{align} M(x,y)+N(x,y)y'=b(x)\\\end{align}$$

we get


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

$$\begin{align}y(t)=\frac{1}{h(t)}exp[\int^{t}h(s)b(s)ds+k_1] \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right">
 * }

(From lecture notes Sec11.)

When t is smaller than t1


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

$$\begin{align}m=m_0-\frac{m_0-m_1}{t_1}t \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.43)
 * }

When t is bigger than t1


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

$$\begin{align}m=m_1 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.44)
 * }


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

$$\begin{align}m\frac{dv}{dt}=-kv^n-mg \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.50)
 * }

If we can integrating (3.9.50), we will get v(t). By integrating v(t), we will get y(t). But it is hard to solve.

In a particular case, if n=0, when t is smaller than t1,we get


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

$$\begin{align}m\frac{dv}{dt}=-k-mg \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.51)
 * }


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

$$\begin{align}dv=\frac{-k-mg}{m}dt \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.52)
 * }


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

$$\begin{align}v(t)=\int^t [-\frac{k}{m_0-\frac{m_0-m_1}{t_1}s}-g]ds \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.53)
 * }


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

$$\begin{align}y(t)=\int^t v(s)ds+y_0=\int^t [\int^t [-\frac{k}{m_0-\frac{m_0-m_1}{t_1}s}-g]ds]ds+y_0 \\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.54)
 * }

By integrating, we get


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

$$\begin{align}v(t)=k\frac{t_1}{m_0-m_1}\ln(\frac{2m_0-m_1}{m_0})-(\frac{k}{m_1}-g)t-\frac{kt_1}{m_1}+C_1\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.55)
 * }


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

$$\begin{align}y(t)=k\frac{t_1}{m_0-m_1}\ln(\frac{2m_0-m_1}{m_0})t-(\frac{k}{m_1}-g)\frac{t^2}{2}-\frac{kt_1}{m_1}t+C_1t+C_2\\\end{align}$$
 * style="width:95%" |

<p style="text-align:right"> (3.9.56)
 * }

Comments
In this case, t is the independent variable. v is the dependent variable.

Given
The following L1 - ODE - CC. (From lecture notes Sec15.)


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

$$\dot x(t) = ax(t) + bu(t)$$ (3.10.1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

and the L1 - ODE - VC


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

$$\dot x(t) = a(t)x(t) + b(t)u(t)$$ (3.10.2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find
Use Integrating factor method to show that the solution of Equation (3.10.1) is


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

$$x(t) = [\exp{a(t - t_0)}] x(t_0) + \int^x[\exp{a(t - \tau)}] b\, u(\tau) d\tau$$ (3.10.3)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

and, Identify the integrating factor, homogenous solution and particular solution. Also, show that the solution to Equation (3.10.2) is given by,


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

$$x(t) = [\exp \int^t_{t_0} a(\tau)d\tau ]x(t_0) + \int^t_{t_0} [\exp \int^t_{\tau} a(s)ds ]b(\tau) u(\tau) d\tau$$ (3.10.4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

Solution of L1 - ODE - CC
Initially we have to derive the integrating factor for the L1 - ODE - CC represented by Equation (3.10.1). Modifying Equation (2) from P 11-2 sec. 11 by setting $$ x $$ as the dependent variable and $$ t $$ as the independent variable.


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

$$ \frac{h_t}{h} = -\frac{1}{N} (N_t - M_x) $$ (3.10.5)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

We have to integrate the above equation by supplying the values of $$ N_t $$ and $$ M_x $$ from Equation (3.10.1) To find $$ N_t $$ and $$ M_x $$, Rewriting Equation (3.10.1)


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

$$ax(t) + bu(t) - \dot x(t) = 0$$ (3.10.6)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

This equation is in particular form. Therefore,
 * {| style="width:100%" border="0"

$$M = ax(t) + bu(t)$$ (3.10.8)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

and


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

$$N = 1$$ (3.10.9)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From Equation (3.10.8) and (3.10.9), We get $$ M_x = a $$ and $$ N_t = 0 $$. So Eqaution (3.10.5) becomes,
 * {| style="width:100%" border="0"

$$ \frac{h_t}{h} = -a $$ (3.10.10)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solving for $$ h $$ using the expression given in Equation (4) in P-11-2.


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

$$ h = \exp[\int^{t}_{t_0} -a\,dt] $$ (3.10.11)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ h = \exp[-a(t - t_0)] $$ (3.10.12)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Equation (3.10.12) represents the Integrating factor for Equation (3.10.1) Now multiplying Equation (3.10.1) by the integrating factor and integrating,


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

$$ \exp[-a(t - t_0)] \dot x(t) = \exp[-a(t - t_0)] ax(t) + \exp[-a(t - t_0)]  bu(t)$$ (3.10.13)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \exp[-a(t - t_0)] \dot x(t) - \exp[-a(t - t_0)] a x(t) =  \exp[-a(t - t_0)]  bu(t)$$ (3.10.14)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

This Equation can be rewritten as,


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

$$ \frac{d}{dt}\exp[-a(t - t_0)] \,x(t) = \exp[-a(t - t_0)]  bu(t)$$ (3.10.15)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ d[\exp[-a(t - t_0)] \,x(t)] = \exp[-a(t - t_0)]  bu(t)\,dt$$ (3.10.16)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Integrating the above equation,


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

$$ \int^{t}_{t_0}d[\exp[-a(t - t_0)] \,x(t)] = \int^{t}_{t_0}\exp[-a(\tau - t_0)]  bu(\tau)\,d\tau$$ (3.10.17)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \exp[-a(t)] \,x(t) - [\exp[-a(t_0)] \,x(t_0) = \int^{t}_{t_0}\exp[a(t - \tau)]  bu(\tau)\,d\tau$$ (3.10.18)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ x(t) - \exp[-a(t - t_0)] \,x(t_0) = \int^{t}_{t_0}\exp[a(t - \tau)]  bu(\tau)\,d\tau$$ (3.10.19)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ x(t) = \exp[-a(t - t_0)] \,x(t_0) + \int^{t}_{t_0}\exp[a(t - \tau)] bu(\tau)\,d\tau$$ (3.10.20)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

We can see that Equation (3.10.20) is same as Equation (3.10.3). From this solution we can find out the homogenous solution and particular solution. Homogenous solution - First term on RHS = $$ \exp[-a(t - t_0)] \,x(t_0)$$ Particular solution - Second term on RHS = $$ \int^{t}_{t_0}\exp[a(t - \tau)] bu(\tau)\,d\tau$$

Solution of L1 - ODE - VC
Comparing Equations (3.10.1) and (3.10.2), we can obtain the integrating factor for the L1 - ODE - VC represented by (3.10.2).
 * {| style="width:100%" border="0"

$$ h = \exp[\int^{t}_{t_0} -a(t)\,dt] $$ (3.10.21) Now, multiplying Equation (3.10.2) with the integrating factor,
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\exp[\int^{t}_{t_0} -a(t)\,dt] \dot x(t) = \exp[\int^{t}_{t_0} -a(t)\,dt] a(t)x(t) + \exp[\int^{t}_{t_0} -a(t)\,dt] b(t)u(t)$$ (3.10.22)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$\exp[\int^{t}_{t_0} -a(t)\,dt] \dot x(t) + \exp[\int^{t}_{t_0} -a(t)\,dt] a(t)x(t) = \exp[\int^{t}_{t_0} -a(t)\,dt] b(t)u(t)$$ (3.10.23)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

We can integrate the above equation on similar lines as the L1 - ODE - CC to obtain the following solution.
 * {| style="width:100%" border="0"

$$x(t) = [\exp \int^t_{t_0} a(\tau)d\tau ]x(t_0) + \int^t_{t_0} [\exp \int^t_{\tau} a(s)ds ]b(\tau) u(\tau) d\tau$$ (3.10.4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Given
Pendulums: $$a=0.3, l=1, k=0.2, m_1g=3, m_2g=6$$

No applied forces: $$u_1=u_2=0$$

Initial conditions:

F11

$$\theta_1(0)=0,\dot\theta_1(0)=-2$$

$$\theta_2(0)=0,\dot\theta_2(0)=+1$$

F12

$$\theta_1(0)=+1,\dot\theta_1(0)=-2$$

$$\theta_2(0)=-1/2,\dot\theta_2(0)=+1$$

And the equations:


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

$$\mathbf{\dot x}(t)=\mathbf{A}(t)\mathbf{x}(t)+\mathbf{B}(t)\mathbf{u}(t)$$ (3.11.1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$m_1l^2\ddot\theta_1=-ka^2(\theta_1-\theta_2)-m_1gl\theta_1+u_1l$$ (3.11.2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$m_2l^2\ddot\theta_2=-ka^2(\theta_2-\theta_1)-m_2gl\theta_2+u_2l$$ (3.11.3)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\mathbf{x}(t)=[\exp\{\mathbf{A}(t-t_0)\}]\mathbf{x}(t_0)+\int^t_{t_0}[\exp\{\mathbf{A}(t-\tau)\}]\mathbf{Bu}(\tau )d\tau $$ (3.11.4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find
1. Use matlab's ode45 command to integrate the system (3.11.2) and (3.11.3) in matrix form (3.11.1) for $$t \epsilon [0,7]$$. Can also use equivalent Octave command.

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

3. Plot $$\theta_1(t)$$ from Q1 and from Q2.

Plot $$\theta_2(t)$$ from Q1 and from Q2.

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions. According to (3.11.2) and (3.11.3), we can find:
 * {| style="width:100%" border="0"

$$\displaystyle\ddot\theta_1=\frac{-(ka^2+m_1gl)}{m_1l^2}\theta_1+\frac{ka^2}{m_1l^2}\theta_2+\frac{1}{m_1l^2}u_1l$$ (3.11.5)
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$\displaystyle\ddot\theta_2=\frac{-(ka^2+m_2gl)}{m_2l^2}\theta_2+\frac{ka^2}{m_2l^2}\theta_1+\frac{1}{m_2l^2}u_2l$$ (3.11.6) Thus, the system can be written as:
 * style="width:95%" |
 * <p style="text-align:right">
 * }

$$\displaystyle\begin{bmatrix}\dot\theta_1\\ \ddot\theta_1 \\ \dot\theta_2 \\ \ddot\theta_2 \end{bmatrix}=\begin{bmatrix}0 & 1 & 0 & 0 \\ \frac{-(k a^2 + m_{1} g l)}{m_1 l^2} & 0 & \frac{ka^2}{m_1l^2} & 0 \\ 0 & 0 & 0 & 1 \\ \frac{k a^2}{m_2 l^2} & 0 & \frac{-(k a^2 + m_{2} g l)}{m_2 l^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_1 l} & 0 \\ 0 & 0 \\ 0 & \frac{1}{m_2 l} \end{bmatrix} \ \begin{bmatrix} u_1 \\ u_2 \end{bmatrix}$$ (3.11.6) Mathlab codes and plot from Q1
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Codes of function coupledPendulum:



Mathlab codes and plot from Q2

Given
(From lecture notes Sec12, Pg 4-7.)

The 2nd exactness condition for N2-ODEs are shown below:


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

$$ f_{xx} + 2pf_{xy} + p^2f_{yy} = g_{xp} + pg_{yp} - g_y $$     (3.12.1)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_{xp} + pf_{yp} + 2f_y = g_{pp} $$     (3.12.2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$f$$ and $$g$$ are defined as:


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

$$ g(x,y,p) := \phi_x(x,y,p) + \phi_y(x,y,p)p $$     (3.12.3)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f(x,y,p) := \phi_p(x,y,p) $$     (3.12.4) (with $$p := y'$$.)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find
1. Derive equation (3.12.2), the 2nd relation in the 2nd exactness condition, by differentiating the definition of $$g(x,y,p)$$ in equations (3.12.3) w.r.t. $$p$$.

2. Derive equation (3.12.1), the 1st relation in the 2nd exactness condition.

3. Verify that


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

$$ x(p)^2 + yp + (xy)y'' = 0 $$     (3.12.5)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$f$$ and $$g$$ are:


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

$$ g(x,y,p) := xp^2 + yp $$ (3.12.6)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f(x,y,p) := xy $$ (3.12.7)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

satisfies the 2nd exactness condition.

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

For brevity, '$$(x,y,p)$$' will be omitted in the equations below.

Deriving the 2nd Relation in the 2nd Exactness Condition
Taking the derivative of $$g$$ w.r.t. $$p$$,


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

$$ \begin{align} \frac{\partial g}{\partial p} &= \frac{\partial}{\partial p}(\phi_x + \phi_yp) \\ g_p &= \phi_{xp} + \phi_{yp}p + \phi_y \end{align} $$     (3.12.2)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Taking the another derivative w.r.t. $$p$$ gives,


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

$$ \begin{align} \frac{\partial g_p}{\partial p} &= \frac{\partial}{\partial p}(\phi_{xp} + \phi_{yp}p + \phi_y) \\ g_{pp} &= \phi_{xpp} + \phi_{ypp}p + \phi_{yp} + \phi_{yp} \\ &= \phi_{xpp} + \phi_{ypp}p + 2\phi_{yp} \end{align} $$     (3.12.3)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

which is the right side of the 2nd relation in the 2nd exactness condition. To get the left side of the 2nd relation, we need to take derivatives of $$f$$.


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

$$ \begin{align} \frac{\partial f}{\partial x} &= \frac{\partial \phi_p}{\partial x} \\ f_x &= \phi_{px} \end{align} $$     (3.12.4)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f_x}{\partial p} &= \frac{\partial \phi_{px}}{\partial p} \\ f_{xp} &= \phi_{pxp} \end{align} $$     (3.12.5)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f}{\partial y} &= \frac{\partial \phi_{p}}{\partial y} \\ f_{y} &= \phi_{py} \end{align} $$     (3.12.6)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f_y}{\partial p} &= \frac{\partial \phi_{py}}{\partial p} \\ f_{yp} &= \phi_{pyp} \end{align} $$     (3.12.7)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substituting equations (3.12.4)~(3.12.7) into the left side of equation (3.12.2) gives,


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

$$ \begin{align} f_{xp} + pf_{yp} + 2f_y &= \phi_{pxp} + p(\phi_{pyp}) + 2(\phi_{py}) \\ &= \phi_{pxp} + p\phi_{pyp} + 2\phi_{py} \end{align} $$     (3.12.8)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

If we assume that $$\phi$$ is a smooth function so that the order of partial derivatives does not make a difference, i.e.


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

$$ \phi_{xpp} = \phi_{pxp} = \phi_{ppx} $$     (3.12.9)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

then we see that equations (3.12.3) and (3.12.8) are equal, and the 2nd relation has been derived.

Deriving the 1st Relation in the 2nd Exactness Condition
First we need to derive the terms: $$f_{xx}, f_{xy}, f_{yy}, g_{xp}, $$ and $$g_{yp}$$.

Using the results from the previous section [equations (3.12.4) and (3.12.6)] for partials of $$f$$,


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

$$ \begin{align} \frac{\partial f_x}{\partial x} &= \frac{\partial \phi_{px}}{\partial x} \\ f_{xx} &= \phi_{pxx} \end{align} $$     (3.12.10)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f_x}{\partial y} &= \frac{\partial \phi_{px}}{\partial y} \\ f_{xy} &= \phi_{pxy} \end{align} $$     (3.12.11)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f_y}{\partial y} &= \frac{\partial \phi_{py}}{\partial y} \\ f_{yy} &= \phi_{pyy} \end{align} $$     (3.12.12)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Deriving the partials of $$g$$ gives,


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

$$ \begin{align} \frac{\partial g}{\partial x} &= \frac{\partial }{\partial x}(\phi_x + \phi_yp) \\ g_{x} &= \phi_{xx} + \phi_{yx}p \end{align} $$     (3.12.13)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial g_x}{\partial p} &= \frac{\partial }{\partial p}(\phi_{xx} + \phi_{yx}p) \\ g_{xp} &= \phi_{xxp} + \phi_{yxp}p + \phi_{yx} \end{align} $$     (3.12.14)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial g}{\partial y} &= \frac{\partial }{\partial y}(\phi_x + \phi_yp) \\ g_{y} &= \phi_{xy} + \phi_{yy}p \end{align} $$     (3.12.15)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial g_y}{\partial p} &= \frac{\partial }{\partial p}(\phi_{xy} + \phi_{yy}p) \\ g_{yp} &= \phi_{xyp} + \phi_{yyp}p + \phi_{yy} \end{align} $$     (3.12.16)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substituting equations (3.12.10)~(3.12.12) into the left side of equation (3.12.1) gives,


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

$$ \begin{align} f_{xx} + 2pf_{xy} + p^2f_{yy} &= \phi_{pxx} + 2p(\phi_{pxy}) + p^2(\phi_{pyy}) \\ &= \phi_{pxx} + 2p\phi_{pxy} + p^2\phi_{pyy} \end{align} $$     (3.12.17)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substituting equations (3.12.13)~(3.12.16) into the right side of equation (3.12.1) gives,


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

$$ \begin{align} g_{xp} + pg_{yp} - g_y &= (\phi_{xxp} + \phi_{yxp}p + \phi_{yx}) + p(\phi_{xyp} + \phi_{yyp}p + \phi_{yy}) - (\phi_{xy} + \phi_{yy}p) \\ &= \phi_{xxp} + \phi_{yxp}p + \cancel{\phi_{yx}} + p\phi_{xyp} + p^2\phi_{yyp} + \cancel{p\phi_{yy}} - \cancel{\phi_{xy}} - \cancel{\phi_{yy}p} \\ &= \phi_{xxp} + \phi_{yxp}p + \phi_{xyp}p + p^2\phi_{yyp} \\ &= \phi_{xxp} + 2p\phi_{xyp} + p^2\phi_{yyp} \end{align} $$     (3.12.18)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where it has been assumed, as in the previous section [equation (3.12.9)], that the order of the derivatives does not matter for $$\phi$$. Comparing the equations (3.12.17) and (3.12.18), with the assumption in mind, shows that they are equal, and thus the 1st relation in the 2nd exactness condition has been derived.

Verifying the satisfaction of the 2nd Exactness Condition
In order to verify whether equation (3.12.5) satisfies the 2nd exactness condition, the partials of equations (3.12.6) and (3.12.7) must be taken. Starting with equation (3.12.6) we have,


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

$$ \begin{align} \frac{\partial g}{\partial x} &= \frac{\partial}{\partial x}(xp^2 + yp) \\ g_x &= p^2 \end{align} $$     (3.12.19)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial g_x}{\partial p} &= \frac{\partial}{\partial p}(p^2) \\ g_{xp} &= 2p \end{align} $$     (3.12.20)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial g}{\partial y} &= \frac{\partial}{\partial y}(xp^2 + yp) \\ g_y &= p \end{align} $$     (3.12.21)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial g_y}{\partial p} &= \frac{\partial}{\partial p}(p) \\ g_{yp} &= 1 \end{align} $$     (3.12.22)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial g}{\partial p} &= \frac{\partial}{\partial p}(xp^2 + yp) \\ g_p &= 2xp + y \end{align} $$     (3.12.23)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial g_p}{\partial p} &= \frac{\partial}{\partial p}(2xp + y) \\ g_{pp} &= 2x \end{align} $$     (3.12.24)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Continuing with equation (3.12.7) we have,


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

$$ \begin{align} \frac{\partial f}{\partial x} &= \frac{\partial}{\partial x}(xy) \\ f_x &= y \end{align} $$     (3.12.25)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f_x}{\partial x} &= \frac{\partial}{\partial x}(y) \\ f_{xx} &= 0 \end{align} $$     (3.12.26)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f_x}{\partial y} &= \frac{\partial}{\partial y}(y) \\ f_{xy} &= 1 \end{align} $$     (3.12.27)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f_x}{\partial p} &= \frac{\partial}{\partial p}(y) \\ f_{xp} &= 0 \end{align} $$     (3.12.28)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f}{\partial y} &= \frac{\partial}{\partial y}(xy) \\ f_y &= x \end{align} $$     (3.12.29)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f_y}{\partial y} &= \frac{\partial}{\partial y}(x) \\ f_{yy} &= 0 \end{align} $$     (3.12.30)
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \begin{align} \frac{\partial f_y}{\partial p} &= \frac{\partial}{\partial p}(x) \\ f_{yp} &= 0 \end{align} $$     (3.12.31)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substituting the results of equations (3.12.19)~(3.12.24) into equation (3.12.1) results in,


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

$$ \begin{align} (0) + 2p(1) + p^2(0) &= (2p) + p(1) - (p) \\ 2p &= 2p + \cancel{p} - \cancel{p} \\ &= 2p \end{align} $$     (3.12.32)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

which shows that the 1st relation of the 2nd exactness condition is satisfied.

Substituting the results of equations (3.12.25)~(3.12.31) into equation (3.12.2) results in,


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

$$ \begin{align} (0) + p(0) + 2(x) &= (2x) \\ 2x &= 2x \end{align} $$     (3.12.33)
 * style="width:95%" |
 * <p style="text-align:right">
 * }

which shows that the 2nd relation of the 2nd exactness condition is satisfied.

Since both 1st and 2nd relations of the 2nd exactness condition are satisfied, the equation (3.12.5) satisfies the 2nd exactness condition.

Comments
= Contributors = Report Leader: Vishnu K Narayanan Report Co-Leaders : Yi Zhongwen