User:Egm6321.f12.team4/Report3

Problem R*3.1 – Proof that only one integration constant is necessary in the solution of a general, non-homogeneous, linear, first order differential equation.
sec12-2

Statement
Consider equation 3.1.1 as a general, non-homogeneous, linear, first order ordinary differential equation with varying coefficients (L1-ODE-VC).
 * {| style="width:100%" border="0"

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

It can be shown that only one integration constant is necessary when solving the L1-ODE-VC via Euler's Integrating Factor Method. The proof can be seen below.

Given
If $$ P(x)\ne0 $$, then dividing equation 3.1.1 by $$ P(x) $$ would yield
 * {| style="width:100%" border="0"

$$ a_1(x)y'+a_0(x)y=b(x) $$      (3.1.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

such that $$ a_1(x)=1 $$, $$ a_0(x)=\frac{Q(x)}{P(x)} $$, and $$ b(x)=\frac{R(x)}{P(x)}$$. To solve this L1-ODE-VC, one can employ Euler's Integrating Factor Method by finding an equation $$ h(x) $$ such that
 * {| style="width:100%" border="0"

$$ h(x)=exp(\int^xa_0(s)ds + k1) $$      (3.1.3) and
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$ y(x)=\frac{1}{h(x)}[\int^xh(s)b(s)ds+k_2] $$      (3.1.4) where $$ s $$ is a dummy integration variable.
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Solution
To begin proving that the integration constant $$ k_1 $$ is not necessary to solve equation 3.1.1, one can rewrite
 * {| style="width:100%" border="0"

$$ exp(\int^xa_0(s)ds+k_1)=exp(k_1)exp(\int^xa_0(s)ds) $$      (3.1.5)
 * style="width:95%" |
 * style="width:95%" |
 * 

One can then redefine $$ k_1 $$ as $$ k_1=exp(k_1) $$. Substituting the right hand side of equation 3.1.5 into equation 3.1.4, it is shown that
 * }
 * {| style="width:100%" border="0"

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

Since $$ k_1 $$ is a constant, it can be brought out of the integral.
 * }
 * {| style="width:100%" border="0"

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


 * }

Canceling the $$ k_1 $$ term in the denominator of the left hand term with the right hand term, one is left with
 * {| style="width:100%" border="0"

$$ y(x)=\frac{1}{exp(\int^xa_0(s)ds)}[\int^x[exp\int^xa_0(s)ds]b(s)ds+\frac{k_2}{k_1}] $$      (3.1.6) One can then redefine the integration constant in equation 3.1.6 to be
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$ k_2=\frac{k_2}{k_1} $$
 * style="width:95%" |
 * style="width:95%" |

Thus equation 3.1.6 becomes
 * }
 * {| style="width:100%" border="0"

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

This proves that only one integration constant, $$ k_2 $$, is necessary for the solution of equation 3.1.1 via Euler's Integration Factor Method.
 * }

Author and References

 * Solved and Typed by -- Kaitlin Harris

Problem R*3.2 - Identifying Homogeneous and Particular Solutions
sec11-3 sec11-5

Statement
Show that the solution of

in

agrees with the result presented in King 2003 p.512, i.e.,

Use

and

to identify $$A$$, $$y_H(x)$$ and $$y_P(x)$$. Compare your results with those in King 2003 p.512

Solution
King defines the L1-ODE-VC as

integrating factor as

where $$ t $$ is a dummy variable

And equation

is defined with

where $$ A $$ is constant of integration

Substitute (3.2.4) into (3.2.2), and then expand the equation, we obtain

From (3.2.10), we can separate this equation with respect to (3.2.8) and (3.2.9), thus, we obtain,

Compare (3.2.8) with (3.2.11), it shows that

Compare (3.2.9) with (3.2.12), it shows that

End

Author and References

 * Solved and Typed by -- Jinchao Lu
 * Reviewed by -- Kaitlin Harris

Problem R*3.3 – Homogeneous Solution of L1-ODE-VC
sec12-2

Statement
Instead of identifying $$y_h(x)$$ from $$ h(x) = \exp[\int^x a_0(s)ds + k_1 ] $$  and  $$ y(x) = \frac{1}{h(x)}\left[\int^x h(s)b(s)ds + k_2 \right] $$, solve the homogeneous counterpart of

Solution
To solve this problem, the separation of variable method is used. We can rephrase the above equation as below.

Then we can solve for y by using the separation of variable method.

s is a dummy variable. $$K_2$$ and $$K_1$$ are some constants. Therefore let, $$ K_3 = K_2 - K_1 $$ then,

Since $$ \displaystyle \exp[K_3] $$ is a constant, let $$ \displaystyle K = \exp[K_3] $$ then,

Author and References

 * Solved and Typed by -- Seong Hyeon Hong
 * Reviewed by -- Jinchao Lu

Problem R*3.4 – Determine if equation 12-4(4) is "exact" or "not exact". If "not exact" find the IFM (h) to make it exact
sec12-5

Statement
Consider the general, non-homogeneous, linear, first order ordinary differential equation with varying coefficients (L1-ODE-VC) given below,
 * {| style="width:100%" border="0"

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

Is the above L1-ODE-VC "exact"? If "not exact" find IFM (h) to make it exact.

Solution
While the above L1-ODE-VC is affine, the second exactness criteria needs to be verified, which is,
 * {| style="width:100%" border="0"

$$ M_{y}(x,y)= N_{x}(x,y) $$      (3.4.2)
 * style="width:95%" |
 * style="width:95%" |
 * 


 * }

Comparing the equation provided in the problem statement(3.4.1) to the general affine equation below,


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

$$ M(x,y)+N(x,y)\,y'=0 $$      (3.4.3)
 * style="width:95%" |
 * style="width:95%" |
 * 


 * }

Hence, by comparison between (3.4.1) and (3.4.3) values of $$ M(x,y)= x^{4}y+10 $$ and $$ N(x,y)= \frac{1}{2}x^{2} $$,

To calculate $$ M_{y}(x,y)$$,


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

$$ M_{y}(x,y)= \frac{\partial }{\partial y}\left ( x^ {4}y+10\right )= x^{4} $$      (3.4.4)
 * style="width:95%" |
 * style="width:95%" |
 * 


 * }

To calculate $$ N_{x}(x,y)$$,


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

$$ N_{x}(x,y)= \frac{\partial }{\partial x}\left ( \frac{1}{2}x^{2}\right )= x $$ (3.4.5)
 * style="width:95%" |
 * style="width:95%" |
 * 


 * }

Therefore since


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

$$ M_{y}(x,y)\neq N_{x}(x,y) $$      (3.4.6)
 * style="width:95%" |
 * style="width:95%" |
 * 


 * }

the L1-ODE-VC is "not exact".

Part 2: To calculate the IFM (h),

Consider the derivation of the term


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

$$ h(x,y)\left [ M(x,y)+N(x,y)y^{'}) \right ]=0 $$     (3.4.7)
 * style="width:95%" |
 * style="width:95%" |
 * 


 * }


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

$$ (hM)+(hN)y^{'}= 0 $$ (3.4.8)
 * style="width:95%" |
 * style="width:95%" |
 * 

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

$$ hM = \hat{M}$$ and $$ hN = \hat{N}$$ (3.4.9)
 * style="width:95%" |
 * style="width:95%" |
 * 


 * }

2nd exactness criterion applied to the equation above,


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

$$ \hat{M_y}= \hat{N_x}$$ (3.4.10)
 * style="width:95%" |
 * style="width:95%" |
 * 


 * }


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

where $$ \hat{M_y}= h_{y}M+ hM_{y}$$ and $$ \hat{N_x}= h_{x}N+ hN_{x}$$ (3.4.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">

After solving as per the 2nd exactness criterion above,
 * }
 * {| style="width:100%" border="0"

$$ h_xN-h_yM+h(N_x - M_y)=0 $$ (3.4.12)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }

Now (3.4.12) is a complex PDE that can be solved by using a case in which $$ h_y(x,y)=0 $$, making h -> function strictly of x.


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

$$ h_xN+h(N_x - M_y)=0 $$ (3.4.13)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }


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

$$ \frac{h_x}{h}=-\frac{1}{N}(N_{x}-M_{y})=:n\left ( x \right ) $$ (3.4.14)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }

To calculate the value of $$ n\left ( x \right ) $$, and from values of $$N(x,y)$$, $$ M_y(x,y) $$ and $$ N_x(x,y) $$ from (3.4.3),(3.4.4) and (3.4.5) respectively,


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

$$ n\left ( x \right )= \frac{-1}{\frac{1}{2}x^{2}}\left ( x-x^{4} \right ) $$ (3.4.15)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }


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

$$ \frac{-2}{x}+2 x^{2}=:n(x) $$ (3.4.16)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }

Integrating on both sides for equation (3.4.14)wrt x,


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

$$log h(x)= \left [ \int ^{x} \left ( \frac{-2}{x}+2 x^{2} \right )+ k1 \right ] $$ (3.4.17)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }


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

$$h(x)=exp^\left( {-2 log x + \frac{2}{3}x^{3}+k1} \right ) $$ (3.4.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }


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

$$h(x)=\frac{1}{x^2}exp^\left( {\frac{2}{3}x^{3}+k1} \right ) $$ (3.4.19)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }

where k1=constant of integration.

$$ h_x $$ is the value of the Euler Integration Factor as required by the problem statement.

Author and References

 * Solved and Typed by -- Jason Alphonso
 * Reviewed by -- Seong Hyeon Hong

Problem R*3.5 – Condition for exactness of a N1-ODE
sec13-3

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

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

can be transformed to an exact form by finding out the integrating factor $$ h(x) $$, only if  $$ k_1(y) = constant$$

Given

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

$$ \bar b(x,y) := \int^x b(s)ds + k_1(y) $$      (3.5.2)
 * style="width:95%" |
 * 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) $$      (3.5.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solution
From Eq. (3.5.1), we can see that
 * {| style="width:100%" border="0"

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


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

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

If we assume that $$ h $$ is a function of x only,

From (2)p11.2 Since LHS($$ \frac{h_x}{h}$$) is a function of x only,we see that the RHS should be a function of x alone. Evaluating $$ N_x $$ and $$ M_y $$,


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

$$ N_x = \frac{\partial}{\partial x} \bar b(x,y) c(y) $$      (3.5.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From 3.5.2, using the expression for $$ \bar b(x,y) $$


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

$$ N_x = c(y) b(x) $$      (3.5.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ M_y = \frac{\partial}{\partial y} \bar c(x,y) a(x) $$      (3.5.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From 3.5.2, using the expression for $$ \bar c(x,y) $$


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

$$ M_y = c(y) a(x) $$      (3.5.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Putting these in (2) 11.2,


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

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


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

$$ \frac{h_x}{h}= -\frac{1}{\bar b(x,y)c(y)} (c(y)b(x)-a(x)c(y)) $$      (3.5.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Cancelling out c(y) from the equation,
 * {| style="width:100%" border="0"

$$ \frac{h_x}{h}= -\frac{1}{\int^x b(s)ds + k_1(y)} (b(x)-a(x)) $$      (3.5.12)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

It can be seen that for the right hand side to be a function of only x, $$ k_1(y) $$ should be a constant.

Author and References

 * Solved and Typed by -- Pushkar Mishra
 * Reviewed by -- Jason Alphonso

Statement
Verify that (1)13-4

either is exact, or can be made exact by the IFM and find the integrating factor h.

Solution
Let

Then the N1-ODE can be written in the particular form:

So it satisfies the first exactness condition.

For the second exactness condition:

It is clear that

So the second exactness condition does not hold without the IFM.

Assume an IF $$h(x,y)$$ to let the second exactness condition hold:

Take the partial derivative with either x or y on each side of the equation:

Assume that $$h(x,y)=h(x)$$. The expressions for the above partial derivatives are simplified to:

Let the above two expressions equal. We have:

where

So

Thus, the N1-ODE can be made exact by the IFM and the h(x) is derived.

Author and References

 * Solved and Typed by -- Rui Che
 * Reviewed by -- Pushkar Mishra

Problem R*3.7 – Finding the first integral of an equation made exact by use of the Integrating Factor Method
sec13-4

Statement
Find a non-linear ordinary differential equation (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.1) such that
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

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

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

that is either exact or can be made exact through use of the Integrating Factor Method. Find the first integral $$ \phi (x,y)=k $$.

Given

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

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

$$ b(x)=cosx $$      (3.7.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

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

Solution
Solving equations 3.7.2 and 3.7.3 from the given equations 3.7.5 and 3.7.6
 * {| style="width:100%" border="0"

$$ \bar{b}(x,y)=\int^xcos(x)dx+k_1(y)= -sinx+k_1(y) $$      (3.7.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

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

Recalling homework problem R*3.5, $$ k_1(y)=d_1=constant $$. Then substituting equations 3.7.7 and 3.7.8 into equation 3.7.1 yields
 * {| style="width:100%" border="0"

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

To satisfy the first exactness condition of N1-ODEs, equation 3.7.9 must be of the form
 * {| style="width:100%" border="0"

$$ M(x,y)+N(x,y)y'=0 $$
 * style="width:95%" |
 * style="width:95%" |


 * }

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

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


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

$$ N(x,y)=(-sinx+d_1)(exp(2y)) $$      (3.7.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">

and rearranging, one can see that equation 3.7.9 can be written as
 * }
 * {| style="width:100%" border="0"

$$ M(x,y)+N(x,y)y'=0 $$
 * style="width:95%" |
 * style="width:95%" |

As such, it is shown that the above equations 3.7.4-3.7.6, when manipulated according to the formula of equation 3.7.1, can be rearranged to form an equation that satisfies the first exactness condition of N1-ODEs.
 * }

The second exactness condition states that
 * {| style="width:100%" border="0"

$$ \frac{\partial M(x,y)}{\partial y}=\frac{\partial N(x,y)}{\partial x} $$ Using the definitions of $$ M(x,y) $$ and $$ N(x,y) $$ from equations 3.7.10 and 3.7.11
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$ \frac{\partial M(x,y)}{\partial y}=\frac{\partial}{\partial y} [(sinx^3)(\frac{1}{2}exp(2y)+k_2)] $$
 * style="width:95%" |
 * style="width:95%" |

$$ \frac{\partial}{\partial y}[\frac{sinx^3}{2}exp(2y)+sinx^3(k_2)] $$

$$ sinx^3exp(2y) $$     (3.7.12)
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$ \frac{\partial N(x,y)}{\partial x} = \frac{\partial}{\partial x} [(-sinx+d_1)(exp(2y))] $$ $$ \frac{\partial}{\partial x}[(-sinx+d_1)(exp(2y)d_1)] $$
 * style="width:95%" |
 * style="width:95%" |

$$ -exp(2y)cosx $$     (3.7.13)
 * <p style="text-align:right">
 * }

It can be seen that
 * {| style="width:100%" border="0"

$$ sinx^3exp(2y)\ne -exp(2y)cosx $$
 * style="width:95%" |
 * style="width:95%" |

$$ \therefore \frac{\partial M(x,y)}{\partial y} \ne \frac{\partial N(x,y)}{\partial y} $$


 * }

Thus equation 3.7.9 does not satisfy the second exactness condition and is therefore not exact. The Integrating Factor Method must be used to find the exact solution and $$ \phi (x,y) $$.

The first integral $$ \phi (x,y) $$ is found according to the equation
 * {| style="width:100%" border="0"

$$ \frac{d\phi (x,y)}{dx} = \frac{\partial \phi (x,y)}{\partial x}+\frac{\partial \phi (x,y)}{\partial y} \frac{dy}{dx}=0 $$
 * style="width:95%" |
 * style="width:95%" |

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

$$ \bar{M}(x,y)= \frac{\partial \phi (x,y)}{\partial x} $$
 * style="width:95%" |
 * style="width:95%" |

$$ \bar{N}(x,y)=\frac{\partial \phi (x,y)}{\partial y} $$


 * }

Define $$ \bar{M}(x,y) $$ and $$ \bar{N}(x,y) $$ as $$ h(x) $$ multiplied by equations 3.7.12 and 3.7.13, where $$ h(x) $$ is the integrating factor that would make equation 3.7.9 exact.

Integrating $$ d\phi $$ yields
 * {| style="width:100%" border="0"

$$ \int d\phi = \int \frac{\partial \phi}{\partial x} dx+\int \frac{\partial \phi}{\partial y} \underbrace{\frac{dy}{dx}dx}_{dy} $$
 * style="width:95%" |
 * style="width:95%" |

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

$$ \phi = \int h(x)[\frac{sinx^3}{2}exp(2y)+k_2]dx+ \int h(x)[(-sinx+d_1)exp(2y)]dy $$


 * }

Since $$ exp(2y)\ne f(x) $$ and $$ -sinx+d_1 \ne f(y) $$, they can be taken out of the first and second integrals, respectively, on the right hand side of the equation. Thus one is left with
 * {| style="width:100%" border="0"

$$ \phi = \frac{exp(2y)}{2}\int h(x)sinx^3dx+ \int h(x)k_2dx+ (-sinx+d_1)\underbrace{\int h(x)exp(2y)dy}_{h(x)\frac{1}{2}exp(2y)} $$     (3.7.14)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

In equation 3.7.14, there is no direct integral for the function of $$ sinx^3 $$. However, one can redefine $$ k=\int h(x)k_2dx $$ and rearrange equation 3.7.14 to be
 * {| style="width:100%" border="0"

$$ \phi = \frac{exp(2y)}{2}[\int h(x)sinx^3dx+h(x)(-sinx+d_1)+k] $$     (3.7.15)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Equation 3.7.15 is the first integral $$ \phi (x,y) $$ for the set of given equations 3.7.4-3.7.6 when used in equation 3.7.1.

Authors and References

 * Solved and Typed by -- Kaitlin Harris

Problem R*3.8 - Constructing a class of N1-ODEs
sec11-3 sec12-3 sec13-2

Statement
Construct a class of N1-ODEs, which is the counterpart of

and satisfies the condition

that an integrating factor $$ h(y) $$ can be found to render it exact.

Solution
To satisfy the above condition, consider

Integrate (3.8.4), (3.8.5) and (3.8.3)

We obtain,

Thus, we can determine a counterpart of (3.8.1)

Where $$a(y)$$,$$b(y)$$,$$c(x)$$ are arbitrary functions.

End

Author and References

 * Solved and Typed by -- Jinchao Lu
 * Reviewed by -- Kaitlin Harris

Problem R*3.9 - Deriving Solving Equations of Motion
sec14-2

Statement
1. Derive the equations of motion

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

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

''3.1. Is (3.9.0), for n=1,2, either exact or can be made exact using IFM? Find $$v_y(t)$$ and $$y(t)$$ for m constant.''

3.2. Find $$v_y(t)$$ and $$y(t)$$ for $$m = m(t)$$

Solution
1. Looking at the figure 3.9.1, we can see that there are two force factors acting on a point which are:$$ kv^n, mg $$. However we want to express them in v which is not a direct force factor. v must be differentiated with respect to time and multiplied by mass to become a force factor. (F = ma = m*(dv/dt))

We can easily derive equations (1) and (2) by taking the sum of all the force factors in x and y direction respectively.

Sum of forces acting in x direction.

Sum of forces acting in y direction.

Negative signs indicate that the forces are acting in opposite directions of vx and vy.

The third equation can be proved by the Pythagoras theorem which is,

When C is the hypotenuse of sides A and B which are right angle to each other forming right angle triangle. If you look at the figure it is clear that the three vectors form a right angle triangle such that magnitude of v is a hypotenuse of the addition of magnitude of vx and magnitude of vy.

Although v, vx, vy are vectors when they are squared they become scalar values and therefore the Pythagoras theorem can be used to derive the equation 3. Therefore,

The last equation can be derived by a simple trigonometry relationship. If there is a right angle triangle in such a way that C is the hypotenuse, A is the adjacent, B is the opposite side, and let theta be the angle between A and C then,

With the above relationship and the relationship of angle alpha and v, vx, vy we can make replacements as below.

Now we have the equation,

2. Recall equation,

Since k = 0, the equation now becomes,

Before we actually solve for y(x) it is really important to know that g is a constant which have a values of gravitational force of Earth. We will integrate equation 3.9.8 with respect to time twice to find y(x).

However, the right hand side of the equation, we must have a function of x, since we know that y(x) is a function of x. Therefore on the right hand side, instead of integrating it with respect to time we will use the relationship,

Now we can integrate the right hand side with respect to x and integrate left hand side with respect to time. There is an assumption that the v_x is a function of time, not x.

The equation (3.9.12) shows that y(x) is a parabola.

3.

There are two exactness conditions to check whether the equation is exact or not. Here are the two exactness conditions.

Let's rewrite the equation (3.9.0) in more general form such that we can apply these conditions.

Since we can have the equation (3.9.0) in the form of (3.9.13) as it is stated in equation (3.9.14) it can be said that the exactness condition 1 is satisfied regardless of n values.

Let's now apply the 2nd exactness condition. We can define $$M_{v_y}$$ and $$N_{t}$$ as follows,

Before we continue applying the second exactness condition we need to consider the fact that the mass function m(t) is not a constant but a time dependent function. If we look at the figure 3.9.2 there is a graph of m with respect to time. We can clearly see that the function m(t) can be defined as below,

Since m(t) is a straight line function and a constant depending on the time given, we need to check the 2nd exactness condition for both cases.

We cannot directly say that the equation (3.9.17) does not satisfy the 2nd exactness condition because we do not know the function $$v_y(t)$$. But since $$m'(t)$$ is just a negative number according to the graph, $$nk(v_y)^{n+1}(t)$$ must be a same negative number in order to be exact.
 * When $$ 0 \leq t < t_1, m(t) = -\frac{m_1 - m_0}{t_1 - t_0}t + m_0 $$

The right hand side of the equation becomes 0 since $$N_t = 0 $$ For any n if the constant k is zero, the equation becomes exact. If k is not zero, then n must equal zero to make the equation exact.
 * When $$ t\geq t_1, m(t) = m_1 $$


 * We cannot find integrating factor for both cases mentioned above when n=2 or n=0 because the equation cannot be written in the form,

However depending on the equation we might be able to solve for $$v_y(t)$$ and $$y(t)$$

3.1: m constant
 * n = 0,


 * n=1


 * n=2

Cannot solve this differential equation with Integrating Factor Method.

3.2


 * n=0

Let $$ \frac{1}{m(t)} = n(t) $$,


 * n=1

Let $$ \frac{1}{m(t)} = n(t) $$,


 * n=2

Cannot solve this differential equation with Integrating Factor Method.

Author and References

 * Solved and Typed by -- Seong Hyeon Hong
 * Reviewed by -- Jinchao Lu
 * Two Figures are from the below links:

Problem R*3.10 – To calculate the solutions for a L1-ODE-VC and L1-ODE-CC
sec15-1 sec15-2

Statement
An L1-ODE-CC (Linear First Order -ODE - Constant Coefficients) is given in the form $$ \dot x(t)= ax(t)+bu(t)$$.Using IFM show that the solution is


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

$$ x(t)= \left [ exp\left \{ a(t-t_{0}) \right \} \right ]x(t_0)+ \int_{t_0}^{t}\left [ exp\left \{ a(t-\tau ) \right \} \right ]bu(\tau)d\tau $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * }

Similarly for an L1-ODE-VC (Linear First Order -ODE - Varying Coefficients) given in the form $$ \dot x(t)= a(t)x(t)+b(t)u(t)$$, show that the solution is in the form


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

$$ x(t)= \left [ exp\int_{t_0}^{t} a(\tau)d\tau \right ]x(t_0)+ \int_{t_0}^{t}\left [ exp \int_{\tau}^{t} a(s)ds) \right ]b(\tau)u(\tau))d\tau $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * }

Solution
L1-ODE-CC : Putting the equation $$ \dot x(t)= ax(t)+bu(t)$$ in the form,


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

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


 * }


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

$$ N=-1$$, and $$ M=ax(t)+bu(t) $$      (3.10.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }

The two variables are t = independent variable and x = dependent variable, hence there exist a function h (x,t).

Assuming a case with h (x,t) is a function of t only, such that the equation


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

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


 * }

where $$M_x=a$$, $$N_t=0$$,  $$N=-1$$ as calculated from equations above.

Hence equation (3.10.3) can now be written as,


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

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


 * }

Integrating the RHS term between an arbitrary start time $$ t_0$$ and $$t$$,

$$ log h= -a(t-t_0) $$      (3.10.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">

$$ h=exp ^{-a(t-t_0)} $$      (3.10.6)
 * }
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }

which is Euler's Integrating factor h

Now multiplying both sides of equation (3.10.1) with the integrating factor $$ h=exp ^{-a(t-t_0)} $$


 * {| 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.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }

Rearranging the terms,


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

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


 * }


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

$$ \frac{\mathrm{d} (exp^{-a(t-t_0)}.x(t))}{\mathrm{d} t}=exp ^{-a(t-t_0)}bu(t) $$      (3.10.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }

Integrating both sides between $$ t_0$$ and $$t$$,


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

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


 * }


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

$$ exp^{-a(t-t_0)}x(t)-x(t_o)=\int_{t_0}^{t}exp^{-a(\tau-t)}b u(\tau)d\tau $$      (3.10.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">


 * }


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

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


 * }

Divide by the term $$ exp^{-a(t-t_0)}$$ provides the solution.


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

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


 * }

The homogenous solution is $$ exp^{a(t-t_0)}x(t_o)$$

The particular solution is $$ \int_{t_0}^{t}exp^{a(t-\tau)}b u(\tau)d\tau $$

Author and References
Fall 2011_Team 2_HW#3
 * Solved and Typed by -- Jason Alphonso
 * Reviewed by -- Seong Hyeon Hong
 * Previous year's solutions was used to gain insight into the solution. The link below also lists the contributing authors.

Problem R*3.11 – System of coupled pendulums
sec15-5

Statement
Given a set of coupled equations describing the motion of two pendulums,


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

$$ m_1 l^2 \ddot \theta_1 = -ka^2 (\theta_1 - \theta_2)-m_1 g l \theta_1 + u_1 l $$ (3.11.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ m_2 l^2 \ddot \theta_2 = -ka^2 (\theta_2 - \theta_1)-m_2 g l \theta_2 + u_2 l $$ (3.11.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

1. Use ode45 command in MATLAB to integrate the above system by putting it in a matrix form, and integrating for t=[0,7].

2. Use (2) p.15-2, i.e. the solution using IFM for the above equations.

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

Given

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

$$ a=0.3 ,\ l=1, \ k=0.2 ,\ m_1g=3, \ m_2g=6 $$      (3.11.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solution
Putting the values of a, k ,m and l in Eq. 3.11.1 and 3.11.2 ,

we get,


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

$$ m_1 l^2 \ddot \theta_1 = -ka^2 (\theta_1 - \theta_2)-m_1 g l \theta_1 + u_1 l $$ (3.11.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ m_2 l^2 \ddot \theta_2 = -ka^2 (\theta_2 - \theta_1)-m_2 g l \theta_2 + u_2 l $$ (3.11.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Dividing Eq. 3.11.1 through out by $$ m_1 l^2 $$ and Eq. 3.11.2 by $$ m_2 l^2 $$
 * {| style="width:100%" border="0"

$$ \ddot \theta_1 = \frac{-ka^2}{m_1l^2}\theta_1 + \frac{-ka^2}{m_1l^2}\theta_2 - \frac{m_2gl}{m_2l^2}\theta_1 + \frac{u_1l}{m_1l^2} $$      (3.11.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

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

Cancelling and rearranging terms gives,


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

$$ \ddot \theta_1 = (\frac{-ka^2}{m_1l^2}-\frac{g}{l}) \theta_1 + \frac{ka^2}{m_1l^2}\theta_2+ \frac{u_1}{m_1l} $$      (3.11.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \ddot \theta_2 = \frac{ka^2}{m_1l^2} \theta_1 + (\frac{-ka^2}{m_1l^2}-\frac{g}{l})\theta_2+ \frac{u_2}{m_2l} $$      (3.11.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

To put the above equation in the form ,


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

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

We should define


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

$$ x := [\theta_1 \ \dot\theta_1 \ \theta_2 \ \dot\theta_2]^T $$      (3.11.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Eq. 3.11. and 3.11. can be rewritten in the matrix form as,
 * {| style="width:100%" border="0"

$$ \begin{Bmatrix}
 * style="width:95%" |
 * style="width:95%" |

\ \dot \theta_1 \\ \ddot \theta_1 \\ \dot \theta_2 \\ \ddot\theta_2

\end{Bmatrix} = \begin{Bmatrix} 0 & 1 & 0 & 0\\ (\frac{-ka^2}{m_1l^2}-\frac{g}{l}) & 0 & \frac{ka^2}{m_1l^2} & 0\\ 0 & 0 & 1 & 0\\ \frac{ka^2}{m_2l^2} & 0 & (\frac{-ka^2}{m_2l^2}-\frac{g}{l}) & 0 \end{Bmatrix} \begin{Bmatrix} \theta_1 \\ \dot \theta_1 \\ \theta_2 \\ \dot \theta_2

\end{Bmatrix} + \begin{Bmatrix} 0 & 0\\ \frac{1}{m_2l} & 0\\ 0 & 0\\ 0 & \frac{1}{m_1l} \end{Bmatrix} \begin{Bmatrix} u_1\\ u_2 \end{Bmatrix}

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

Using the values of k,a,m,l and u, the matrix becomes,


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

$$ \begin{Bmatrix}
 * style="width:95%" |
 * style="width:95%" |

\ \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 & 1 & 0\\ 0.03 & 0 & -10.03 & 0 \end{Bmatrix} \begin{Bmatrix} \theta_1 \\ \dot \theta_1 \\ \theta_2 \\ \dot \theta_2

\end{Bmatrix} $$      (3.11.13)
 * <p style="text-align:right">
 * }

The Following MATLAB program is written to solve the ODE.


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


 * style="width:95%" |
 * function main
 * Xo=[1 -2 -0.5 1];
 * tspan = [0,7];
 * tspan = [0,7];


 * [t,X]= ode45(@Funct, tspan, Xo);


 * end


 * function [xdot]= Funct(t,X)


 * A=[0 1 0 0; -10.06 0 0.06 0;0 0 1 0;0.03 0 -10.03 0];


 * xdot = A*X;
 * end


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

2) Using the solution as discussed in R*3.10 ,


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

$$ x(t) = exp (A(t-t_0))x(t_0) $$      (3.11.14)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

since u is 0 for our case.


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

$$ \begin{Bmatrix}
 * style="width:95%" |
 * style="width:95%" |

\ \dot \theta_1 \\ \ddot \theta_1 \\ \dot \theta_2 \\ \ddot\theta_2

\end{Bmatrix} = exp (A(t))\begin{Bmatrix}

\ 1 \\ -2 \\ -0.5 \\ 1

\end{Bmatrix} $$      (3.11.15)
 * <p style="text-align:right">
 * }

We wrote the following MATLAB code to find the solution,


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


 * style="width:95%" |
 * function main1
 * function main1


 * A=[0 1 0 0; -10.06 0 0.06 0;0 0 1 0;0.03 0 -10.03 0];
 * x0=[1 -2 -0.5 1];
 * dx = zeros(length(t), 4);
 * for i=1 : length(t)
 * dx(i,:) = exp(A*t(i))*x0';
 * end


 * To plot the the different solutions we wrote the following code :
 * hold on
 * figure(3)
 * hold on
 * plot (t,X(:,1))
 * plot (t,dx(:,1), 'r-')
 * hold off
 * grid on
 * legend('Q1','Q2');
 * ylabel('x'); xlabel('t'); title('theta1');


 * figure(4)
 * hold on
 * plot (t,X(:,3))
 * plot (t,dx(:,3), 'r-')
 * hold off
 * grid on
 * legend('Q1','Q2');
 * ylabel('x'); xlabel('t'); title('theta2');
 * end


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

3) The graph of $$\theta_1$$ and $$ \theta_2 $$ as obtained from Q.1 and Q.2 are shown below.



Author and References

 * Solved and Typed by -- Pushkar Mishra
 * Reviewed by -- Jason Alphonso
 * Reviewed by -- Seong Hyeon Hong

Statement
1. Derive (2)p.16-5, the 2nd exactness condition, by differentiating the definition of $$g(x,y,y') $$in (3)p.16-4 with respect to $$p:=y'$$ defined in (2)p.7-3

2. Derive (1)p.16-5, the 1st relation in the 2nd exactness condition.

3. Verify that (1)p.16-6 satisfies the 2nd exactness condition.

Solution for (1)
The 2nd exactness condition (2)p.16-5 can be written as:

Since

where

(3.12.2) can also be written as:

where

Take the derivative of $$g(x,y,p)$$ with respect to $$p$$:

Since

and substitute (3.12.6) into (3.12.8) and (3.12.8), we have:

Substitute (3.12.10) and (3.12.11) into (3.12.7):

Take the second derivative of $$g(x,y,p)$$ with respect to $$p$$:

Substitute (3.12.11) into the above equation, we have

Finally, we have

which is the required equation to prove.

Solution for (2)
The 1st exactness condition (1)p.16-5 can be written as:

From (3.12.5):

Take the derivative of both sides of (3.12.16):

Substitute (3.12.10) and (3.12.11) into the above equation:

Then we have:

From (3.12.5) and (3.12.11):

Substitute (3.12.21) into (3.12.22) for $$\phi_y$$:

which can be reorganized as:

Using

and substitute (3.12.24),(3.12.20) into the above equation, we have:

After reorganization, we have

which is the required 1st exactness condition.

Solution for (3)
(1)p.16-6 is:

Then we can find that

For the first exactness condition:

in which we have

Substitute (3.12.35) into (3.12.36), we have:

So the first exactness condition is satisfied.

For the second exactness condition:

Substitute (3.12.35) and (3.12.38) into (3.12.37):

So the second exactness condition also holds. Proved.

Author and References

 * Solved and Typed by -- Rui Che
 * Reviewed by -- Pushkar Mishra

Team Contributions

 * Seong Hyeon Hong (SH) Solved all problems.
 * Jason Alphonso (JA) Solved all problems.
 * Pushkar Mishra (PM) Solved all problems.
 * Jinchao Lu (JL) Solved all problems.
 * Che Rui (CH) Solved all problems.
 * Kaitlin Harris (KH) Solved all problems.