User:Egm6321.f12.team2/Report3

=Introduction=

Summary
This report shows various examples of proving exactness conditions of ODE's, and using Integration Factor Method to achieve exactness. In addition, solutions to homogeneous linear and non-linear first and second order equations are explored.

Team Members
Zhe Wang Yitien Yan Ranjit Alexander Karl Van Wyk Anubhav Mohan

=R*3.1 Show only one integration constant is needed for solution of L1-ODE-VC=

Given
The general non-homogenous L1-ODE-VC, The solution when the integrating factor is only a function of $$x$$ is of the form, where $$h(x)$$ is the following, From equations ($$) and ($$), there exist two constants $$k_1,\, k_2$$. Only one is needed through the following proof.

Find
Show that only one integration constant is needed for the solution of an L1-ODE-VC.

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions. If equation ($$) is substituted into equation ($$), the following is obtained, Where $$C_1=\exp k_1$$, and $$k_1,k_2$$ are integration constants. Essentially, equation ($$) shows how $$y(x)$$ would be the same if $$k_1$$ were included in equation ($$) or not given by the first integration constant canceling out. Clearly this implies that only one integration constant is needed which exists in equation ($$)

Given
The solution of $$ \displaystyle y'+a_{0}\left(x\right)y=0 $$ is $$ \displaystyle y\left(x\right)=\frac{1}{h\left(x\right)}\left[\int^{x}h\left(s\right)b\left(s\right)ds+k_{2}\right] $$. This is presented in King 2003 p.512 as: where and Note that the notations $$ P\left(x\right) $$ and $$ Q\left(x\right) $$ adopted in King 2003 p.512 correspond to $$ a_{0}\left(x\right) $$ and $$ b\left(x\right) $$ in the lecture notes respectively. Refer (3) p.11-3.

Find
Use $$ h\left(x\right)=exp\left[\int^{x}a_{0}\left(s\right)ds+k_{1}\right] $$ and $$ y\left(x\right)=\frac{1}{h\left(x\right)}\left[\int^{x}h\left(s\right)b\left(s\right)ds+k_{2}\right] $$ to identify $$ A$$, $$ y_{H}\left(x\right)$$ and $$ y_{P}\left(x\right)$$

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

$$ \frac{1}{h\left(x\right)}=exp\left[-\int^{x}a_{0}\left(s\right)ds-k_{1}\right]=exp\left[-k_{1}\right]exp\left[-\int^{x}a_{0}\left(s\right)ds\right] $$  $$ \int^{x}h\left(s\right)b\left(s\right)ds=exp\left[k_{1}\right]\int^{x}b\left(s\right)exp\left[\int^{s}a_{0}\left(t\right)dt\right]ds $$

$$ y\left(x\right) $$ can then be expressed as:

As can be seen, the solution for $$ y\left(x\right)$$ are of the same form in both the cases.The comparison results between ($$) and ($$) can be obtained as follow:

As we can see, the results agree with those in King 2003 p.512.

Given
$$\displaystyle y_H(x) $$ can be derived from $$ \displaystyle h(x)=exp\left[\int^{x}a_{0}(s)ds+k_{1}\right]

$$ and $$ \displaystyle y(x)=\frac{1}{h(x)}\left[\int^x h(s)b(s)ds + k_2\right] $$

Find
Solve for the homogeneous counterpart of $$ y\left(x\right)$$ by solving for $$\displaystyle y' + a_0(x)\,y=0 $$.

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

$$ \begin{align} \\& \displaystyle y' + a_0(x)\,y=0 \\& y'= -a_0(x)y \\& \int^y \frac{dy}{y}=-\int^x a_0(s)ds \\& y(x)=exp \left[-\int^x a_0(s)ds + k \right] \end{align} $$

Find
If ($$) is not exact, find the integrating factor $$ h $$ to make 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. First, check whether ($$) is exact:

Since ($$) is not exact, an integrating factor is needed to make it exact.  Assume the integrating factor $$ h $$ is a function of $$ x $$.  Thus, and can then be applied here.  Where

and the integrating factor $$ h\left(x\right) $$ can be obtained as follow:

Find
Show that the N1-ODE ($$) satisfies the condition of ($$) that an integrating factor $$h(x)$$ can be found to render it exact, only if $$k_1(y) =d_1$$(a contstant). Show that ($$) includes ($$) as a particular solution.

Solution
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions. From ($$) the following can be shown by integration by parts,

and Substitute ($$),($$),&($$) into ($$), Integrate using (3)p11-4, Then subsitute in ($$), Then we get, $$k_1$$ must not be dependant on y and therefore must be a constant for ($$) to be only a function of x. Thus, the first part of the problem has been solved. For the second part of the problem, ($$) can be shown to be a paricular solution of ($$) if,

Thus, the second part of the problem has been solved.

Show That
is exact, or can be made exact by IFM. Then find $$h$$

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

Verifying for Exactness
Equation ($$) can be shown to have components $$N(x,y)$$ and $$M(x,y)$$ as follows: This corresponds with the First Exactness condition:

However, the Second Exactness Condition: is not met, because, and, so,

Making the ODE exact, using IFM, and finding h
Considering the general formula ($$) from the previous question: We can deduce that the individual components of equation ($$) are as follows: $$ c(y)=y^4 $$ $$b(y)=0$$ $$\bar b(x) = \frac{1}{3}x^3$$ $$a(x)=5x^3+2$$ $$c(x)=sin(x)$$ $$\bar c(y) = \frac{1}{5}y^5 $$ where $$b(x)$$ and $$c(y)$$ can be found through derivation, $$ b(x) =\frac {d(\frac{1}{3}x^3)}{dx} = x^2$$ $$c(y)=\frac {d(\frac{1}{5}y^5)}{dy} = y^4 $$ Using the following definitions, we can find $$h$$, the integrating factor: and, where, $$N$$, $$B_x$$ and $$M_y$$ are defined as: Substituting into equation ($$), we get: Expanding, and now, by using the following definition of $$h(x)$$, the integrating factor, and converting $$n(x)$$ to $$n(s)$$, Substituting in for $$n(x)=n(s)$$, where $$k=d$$ and $$s$$ is converted back to $$x$$ the final solution gives:

Given
Create an N2-ODE using the above values, and verify for exactness. If it is not exact, use IFM to make it exact. Furthermore, integrate the final value for $$\phi (x,y)$$

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

Creating the N2-ODE
To create an N2-ODE, we can use equation ($$) and solving for the missing values: Resulting in the following N2-ODE, Since the equation is equal to zero, the first exactness condition is met. To verify the second, we must satisfy Equation ($$) and, so, Hence, we must find an integrating factor to make this N2-ODE exact.

Making the ODE exact, using IFM to find h
By first canceling all instances of $$exp(2y)$$ and using equations ($$) through ($$), we get: We can then substitute into Equation ($$)

Integrating phi
Now we can multiply ($$) and ($$), while canceling out $$exp(2y)$$ to get, In this case, After the derivation of  $$ \frac {\partial \bar M (x,y)}{\partial x}$$, so, our final solution is:

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

$$ \begin{align} \\& \bar b(x,y):=\int^x b(s)ds+k_1(y) \\& \bar c(x,y):=\int^y c(s)ds+k_2(x) \end{align} $$

Where $$ a(x), b(x), c(y) $$ are arbitrary functions. This particular class of ODE's can be made exact by muliplying with an integrating factor $$h(x)$$.

Find
Construct a class of N1-ODEs, which is the counterpart of the above equation ($$) and satisfies the condition $$ \frac{h_y}{h}=\frac{1}{M}(N_x-M_y)=:m(y) $$. Satisfying the condition would imply that an integration factor $$ h(y)$$ can be found 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. Consider a particular class of N1 ODEs of the form

Where $$ a(y), b(y), c(x) $$ are arbitrary functions. Here {| style="width:100%" border="0"
 * style="width:95%" |
 * style="width:95%" |

$$ \begin{align} \\& \bar c(x,y):=\int^x c(s)ds+k_1(y) \\& \bar a(x,y):=\int^y a(s)ds+k_2(x) \end{align} $$

This particular class of ODE's can be made exact by muliplying with an integrating factor $$h(y)$$, provided we consider $$k_2(x)$$ to be a constant, thus making $$\bar a(x,y) = \bar a(y)$$.Thus

Thus the equation ($$) can also be made exact by multiplying with $$h(y)$$ the integrating factor can be found using $$m(y)$$, by using the equations

Given
Given the equations of motion for a projectile body having mass $$m$$ and velocity $$v$$ moving under gravity and air friction. The air friction is assumed to be proprtional to the nth power of $$v$$. The acceleration due to gravity is taken as $$g$$. The angle the projectile is making with the projectile is taken as $$\alpha$$.

Find
1.Derive the equations of motion. 2. For a particular case $$k=0$$ verify that $$y(x)$$ is a parabola. 3. Consider the case in which the initial velocity is o.ie $$v_x0=0$$.

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. Deriving the equations of motion
The motion of the particle is given by Loc Vu-Quoc in meeting 14 through the following figure:

By Newton's First law, Force = Mass * Acceleration By defintion, acceleration is the first derivative of velocity. If $$a$$ is defined as the acceleration of the body, then The component of acceleration in the x-direction for the particle, $$a_x=\frac{dv_x}{dt}$$ The component of acceleration in the y-direction for the particle, $$a_y=\frac{dv_y}{dt}$$ Hence, from ($$), The component of Force in the x-direction for the particle, $$F_x=m\frac{dv_x}{dt}$$ The component of Force in the y-direction for the particle, $$F_y=m\frac{dv_y}{dt}$$ The resistance force in the x direction is only due to the x component of air resistance.Since air resistance is given as proportional to the nth power of $$v$$,the force due to air resistance $$F_a$$ is given as Hence, the total component of resistance force in the x direction for the particle is given as The resistance force in the y direction is due to the y component of air resistance and also due to gravity. Hence, the total component of resistance force in the y direction for the particle is given as Thus equating the force applied by the body and the force applied on the body in both the x and y direction gives, To obtain the equations of motion of the projectile body, we integrate 3.9.8 and 3.9.9 to get the equations to get the instantaneous postion of the projectile body as a function of time,t. The position of the body is given by $$x(t)$$ and $$y(t)$$. To derive $$x(t)$$, Integrating both sides, Where P is a constant. The left hand side is integrated with respect to x and the right hand side is integrated with respect to y. Again integrating both sides,

This is the equation of motion of the particle in the x direction.Here Q is another constant.Similarly,to derive $$y(t)$$, Integrating both sides, Integrating both sides again gives Where R and U are constants. By applying the condition that at t=0, $$v_x=v_{x0}$$ and $$v_y=v_{y0}$$, we get $$P=v_{x0}$$ and $$R=v_{yo}$$ By applying the condition that at t=0, $$x=0$$ and $$y=0$$, we get $$Q=U=0$$ Thus, equations of motion becomes, These are the equations of motion for a projectile body under gravity and air resistance.ie ($$) and ($$)

Part 2. Consider the case $$k = 0$$
Here the motion of the particle is considered without air resistance. Then the equations of the motion becomes, Rearranging ($$) Substituting ($$) into ($$) gives Substituting from ($$) into ($$) gives, This is the equation of a parabola. ie $$y(x)$$ is of the form $$y(x)a=Ax^2+Bx+C$$ which is the general form of parabolic equation.

Part 3. Consider the case $$k \ne 0, v_{x0}=0$$
For the third part of the problem, we have to consider the case in which the intial x direction velocity is considered to be zero. ie$$V_X=0$$. Note the air resistance in case is not considered to be zero ie $$k\neq 0$$. Then the equations of motion reduces to the following,

When n=0,

Thus, the first exactness condition is satisfied where $$M=k+mg,N=m$$. Thus, the second exactness condition is satisfied. Next, n=1: Thus, the first exactness condition is satisfied where $$M=k v_y +mg,N=m$$.

Thus, the second exactness condition is not satisfied. Use IFM to find integrating factor that makes it exact. Assuming that the integrating factor is only a function of t,

Finally, consider the case when n=2:

Which satisfies the first exactness condition with $$M=k(v_y)^2+mg,N=m$$.

Thus, the second exactness condition is not satisfied. Invoke IFM to find integrating factor to make exact:

Therefore, the integrating factor is only a function of $$v_y$$. Finally,

Now, we find $$v_y(t),y(t)$$ when m is constant. Since the equation of motion isn't exact for arbitrary n, we use the IFM to find the integration factor, and then finally the solution:

Finally, to get $$h_{v_y}$$, we take integrals of both sides to get Thus,$$h_{v_y}$$ is, Thus the equation of motion in the general case is given by,

Given
The following L1-ODEs,

Show
That the solutions to equations 3.10.1 and 3.10.2 are the following, respectively.

Additionally, for each solution, identify the integrating factor, the homogenous solution, and the particular solution.

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

Solution to L1-ODE-CC
Rewrite 3.10.1 as, Therefore, $$M=-ax(t),N=1$$. Checking case 1 of integrating factor method, we see that the integrating factor is, Thus, the integrating factor is, Finally, the solution is found as, Distributing and simplifying yields, Where $$[\exp{a(t-t_0)}]x(t_0)$$ is the homogenous solution, and $$\int^t_{t_0} [\exp{a(t-\tau)}]bu(\tau)d \tau$$ is the particular solution.

Solution to L1-ODE-VC
Rewrite 3.10.2 as, Therefore, $$M=-a(t)x(t),N=1$$. Checking case 1 of integrating factor method, we see that the integrating factor is, Thus, the integrating factor is, Finally, the solution is found as, Distributing and simplifying yields, where $$\left[ \exp \int^t_{t_0} a(\tau)d \tau \right] x(t_0)$$ is the homogenous solution, and $$\int^t_{t_0} \left[ \exp \int^t_{\tau} a(s) ds \right] b(\tau) u(\tau) d \tau$$ is the particular solution.

= R*3.11 - Free vibration of coupled pendulums=

Given
The equations of motion of coupled pendulums: Parameters: $$\displaystyle \begin{align} \mbox{Pendulums: } &a=0.3, \mbox{ } l=1, \mbox{ } k = 0.2 \\ &m_1 g = 3, \mbox{ } m_2 g = 6 \end{align} $$ $$\displaystyle \mbox{No applied forces: } u_1=u_2=0 $$ $$\displaystyle \begin{align} \mbox{Ini}&\mbox{tial conditions: } \\ &\theta_1 (0)=0, \mbox{ } \dot{\theta_1}(0)=-2 \\ &\theta_2 (0)=0, \mbox{ } \dot{\theta_2}(0)=+1 \\ \end{align} $$

Find
1. Integrate the system in matrix form for $$\displaystyle t \in [0,7] $$ 2. Use (2) p.15-2 to find the solution 3. Plot the results

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

Integrate the system in matrix form
In order to represent the Eq. (11.1) in matrix form (1), the following state variables are defined. Then, the Eq. (11.1) can be rewritten as following. Rearrange the terms in the Eq. (11.3), Finally, the follow matrix equation is obtained.

The following is a matlab code to integrate the system.
 * {| style="width:100%" border="0" align="center"

The following figure is the plot of the integration results.
 * style="width:30%; padding:10px; border:1px solid #888888" align="left" |
 * style="width:30%; padding:10px; border:1px solid #888888" align="left" |
 * }
 * }
 * }

Use (2) p.15-2 to find the solution
Since no input is applied to the system, the second term in the Eq. (11.6) is zero. The matlab code shows the problem-solving using the Eq. (11.7).
 * {| style="width:100%" border="0" align="left"


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

The following figure is the plot of the results solved using the Eq. (11.7).
 * }
 * }
 * }

Plot the results
Refer to Figure 11.1 and Figure 11.2 $$\displaystyle x_1 $$ in Figure 11.1 and Figure 11.2 are $$\displaystyle \theta_1(t) $$ $$\displaystyle x_3 $$ in Figure 11.1 and Figure 11.2 are $$\displaystyle \theta_2(t) $$

As seen in these figures, the plots of the numerical and analytical solution to the differential equation are the same which is to be expected.

Given
The 2nd exactness condition for N2-ODEs,

and a N2-ODE,

Find
Derive the first and second relations (equations ($$) and ($$)) of the 2nd exactness condition for N2-ODEs. Additionally, show that equation ($$) satisfies the second 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.

Derivation of second relation of 2nd exactness condition for N2-ODE
The solution to a N2-ODE is some function, $$\phi(x,y,p)$$ where $$p=y'$$. Thus,

Thus,

Since $$\phi$$ is a function of three variables, there are three mixed partial derivative relationships that must be satisfied: $$\phi_{xy}=\phi_{yx},\phi_{yp}=\phi_{py},\phi_{px}=\phi_{xp}$$.

Using the relationship, $$\phi_{yp}=\phi_{py}$$,

Derivation of first relation of 2nd exactness condition for N2-ODE
Combining equations 3.12.7 and 3.12.9 along with the relationship $$\phi_{xy}=\phi_{yx}$$, the following is derived,

Show a given N2-ODE satisfies the 2nd exactness condition
From equation ($$), we have the following relationships,

Substituting these relations into equation ($$) (the first relation of 2nd exactness condition), the following is obtained,

Finally, substituting ($$) and ($$) into equation ($$) (the second relation of the 2nd exactness condition, the following is obtained, Thus, equation ($$) satisfies the 2nd exactness condition for N2-ODEs.