User:Egm6321.f12.team3/report3

= R*3.1 Only one constant in the solution to a L1-ODE-VC using Euler's Integrating Factor Method = On our honor, we did this problem on our own, without looking at the solutions in previous semesters or other online solutions.

==Problem: Integration constant k1 not necessary ==

Show that the integration constant k1 in (3) p.11-4 is not necessary, i.e, only k2 in (1) p.11-5 is necessary.

Given: Euler's IF and solution to L1-ODE-VC
The Euler's Integrating Factor for a L1-ODE-VC:

where $$k_1$$ is a constant of integration. Also, the solution to the L1-ODE-VC:

where $$k_2$$ is a constant of integration.

Solution
($$) can be written as:

Substituting ($$) in ($$), yields :

Only one constant remains now.

= R*3.2 Solution to L1-ODE-VC using IFM agrees with the solution in King = On our honor, we did this problem on our own, without looking at the solutions in previous semesters or other online solutions.

==Problem: Compare with King 2003 ==

Show that the solution to the L1-ODE-VC derived in class (P 11-5 ) agrees with the one derived in King 2003 p.512.

Given: Euler's IF and solution to L1-ODE-VC
The Euler's Integrating Factor for a L1-ODE-VC derived in class:

where $$k_1$$ is a constant of integration. Also, the solution to the L1-ODE-VC:

where $$k_2$$ is a constant of integration.

Solution
According to King 2003, the Euler's Integrating factor, $$h(x)$$ is:

and the solution to the L1-ODE-VC is

Substituting ($$) in ($$) yields:

($$) is similar to the ($$) with:
 * $$\displaystyle A=k_2$$
 * $$\displaystyle y_H(x)=\exp\left(-\int^x P(t)dt\right)$$
 * $$\displaystyle y_P(x)=\exp\left(-\int^x P(t)dt\right)\int^x \exp\left(\int^x P(t)dt\right)b(s)ds$$

Hence we can infer that the results derived in class agree with the ones in King 2003.

= R*3.3 Solving for homogeneous portion of general solution for L1-ODE-VC = On our honor, we did this problem on our own, without looking at the solutions in previous semesters or other online solutions.

Problem
Instead of identifying $$ y_H(x)$$ (3) p.11-4 and (1) p.11-5, solve the homogeneous counterpart of (3) p.11-3 i.e.

$$ y' + a_0(x)y = 0 $$

Given
Equation (3) p.11-3:

$$ \displaystyle \underbrace{1}_{\color{blue}{a_1(x)}}y' + \underbrace{ \displaystyle \frac{Q(x)}{P(x)}}_{\color{blue}{a_0(x)}}y = \underbrace{\displaystyle \frac{R(x)}{P(x)}}_{\color{blue}{b(x)}} $$

Solution
The homogeneous counterpart of Equation (3) p.11-3 is :


 * $$ \displaystyle \underbrace{1}_{\color{blue}{a_1(x)}}y' + \underbrace{ \displaystyle \frac{Q(x)}{P(x)}}_{\color{blue}{a_0(x)}}y = 0 $$

($$) is separable, so it is possible to get all the y terms on one side of the equation and all the x terms on the other.

Multiply ($$) by the differential $$dx$$ and then divide by $$y$$

= R*3.4 Determination of integrating factor for O.D.E. = On our honor, we did this problem on our own, without looking at the solutions in previous semesters or other online solutions.

Problem
If Equation (4) p.12-4 is not exact, find the integrating factor h to make it exact.

Solution
First, check if ($$) satisfies both of the exactness conditions for N1-ODEs:

The 1st Exaction Condition is satisfied, because the differential equation has the particular form of (2) p.7-6:


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

The 2nd Exactness Condition requires that $$ \displaystyle \frac{\partial M(x,y)}{\partial y} = \frac{\partial N(x,y)}{\partial x} $$


 * $$\displaystyle \frac{\partial M}{\partial y} \neq \frac{\partial N}{\partial x}$$

($$) does not satisfy the 2nd Exactness Condition:


 * $$ \displaystyle N(x,y) = f(x) $$ so we have the case where the integrating factor is a function of x only i.e. $$ \displaystyle \frac{\partial h(x,y)}{\partial y} = 0 $$

= R*3.5 Verify that the integrating factor for a N1-ODE is a function of x only for constant k1(y)= On our honor, we did this problem on our own, without looking at the solutions in previous semesters or other online solutions.

Problem
Show that the N1-ODE (1) pg.13-2 satisfies the condition (2) pg.11-2 that an integrating factor $$h(x)$$ can be found to render it exact, only if $$k_1(y)$$ = constant.

Also, show that (1) pg.13-2 includes (1) pg.12-4 as a particular case.

Given

 * $$ \displaystyle \bar b(x,y) := \int^x b(s)ds + k_1(y) $$


 * $$ \displaystyle \bar c(x,y) := \int^y c(s)ds + k_2(x) $$


 * where $$a(x)$$, $$b(x)$$ &  $$c(y)$$  are arbitrary functions.

Solution - Example
Pick arbitrary functions for $$a(x)$$, $$b(x)$$ &  $$c(y)$$

Select $$ k_1(y)= 7 $$ (arbitrary)

Select $$ k_2(x) = x $$ (arbitrary)

($$) is a function of x only. So it satisfies ($$), because the integration constant was chosen such that $$k_1(y)= constant$$.

Now consider if $$ k_1(y) \neq constant$$

Select $$ k_1(y) = y $$

($$) is not a function of x only. This is because the integration constant was chosen such that $$ k_1(y) \neq constant$$

($$) is a particular case of the more general form ($$) in which $$k_1(y)=0$$, $$k_2(x)=0$$  &  $$c(x,y)=1$$.

Solution - Proof
From the given expression ($$), we have

To calculate partial derivatives of ($$) and ($$) ,We have

Thus

It is obviously that, the factor $$ [b(x)-a(x)] $$ is function of x only, the factor $$ [\int^x b(s)ds+k_1(y)]^{-1}$$ is function of x only if $$k_1(y) $$is constant. Therefore we can conclude that the term $$ [\int^x b(s)ds+k_1(y)]^{-1}[b(x)-a(x)] $$, i.e. $$\frac{h_x}{h}$$, can be represented as$$ n(x) $$ so that satisfies the condition ($$) only if $$k_1(y) $$ is constant.

=R*3.6 Determine the integrating factor required to make N1 ODE exact = On our honor, we did this problem on our own, without looking at the solutions in previous semesters or other online solutions.

Problem
Show that Equation (1) pg. 13-4 is exact or can be made to be exact by the integrating factor method. Find the integrating factor $$ h(x) $$

Given

 * $$ \displaystyle \underbrace{(\frac{1}{3}x^3y^4+y^4d_1)}_{\color{blue}{N(x,y)}}y'+ \underbrace{(x^3+\frac{2}{5})y^5+(5x^3+2)sin(x)+(5x^3+2)d_2}_{\color{blue}{M(x,y)}} = 0 $$

Solution
First, check if ($$) satisfies both of the exactness conditions for N1-ODEs:

The 1st Exaction Condition is satisfied, because ($$) has the particular form of (2) p.7-6:

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

The 2nd Exactness Condition requires that $$ \displaystyle \frac{\partial M(x,y)}{\partial y} = \frac{\partial N(x,y)}{\partial x} $$


 * $$ \displaystyle \frac{\partial M}{\partial y} \neq \frac{\partial N}{\partial x}$$

The 2nd exactness condition is not satisfied, so ($$) is not exact.

=R*3.7 Determine the first integral of a N1-ODE= On our honor, we did this problem on our own, without looking at the solutions in previous semesters or other online solutions.

Problem
$$\displaystyle \text{1-Find an N1-ODE of the form Eq(1)p.13-2 that is either exact or can be made exact by IFM} $$

$$\displaystyle \text{2-Find the first integral} \, \phi(x,y)= k $$

Given

 * $$ \displaystyle a(x)= sin x^3 \, \ b(x)= \cos x \, \ c(y) = exp(2y) $$

Solution
Let's substitute the a(x), b(x) and c(y) by its given value into ($$)

$$ \displaystyle  \underbrace{\bar b(x,y)exp(2y)}_{\color{blue}{N(x,y)}}y' + \underbrace{sin x^3\bar c(x,y)}_{\color{blue}{M(x,y)}} = 0$$

($$) becomes.

($$) becomes.

Replace $$\displaystyle \bar b(x,y), \bar c(x,y) $$ into ($$)

=R*3.8 Construct a class of N1-ODE for which the integrating factor is a function of y only=

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

Given
A class of N1-ODEs of the form:

in which,

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

Condition (1) p.11-3, which is given by,

that an integrating factor can be found to render it exact.

Find
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
It has been shown in solution of Problem 3.5 that, ($$) satisfies the condition

that an integrating factor $$ h(x) $$ can be found to render it exact, only if $$ k_1(y) $$ in $$ \bar b(x,y) $$is constant.

Here

It is obviously that $$ c(y) $$ is the common factor of dominator and numerator, therefore the simplification makes the fraction to be function of x only. Thus, to create a function of y only, it is reasonable to exchange the variables and the expressions of terms M and N of ($$), i.e. we construct a kind of expression of $$ h_y/h $$as follow,

We have

Thus the new forms of terms M and N could be

Where

Therefore we construct the new class of N1-ODEs as follow

When $$k_{2}(x) $$in $$\bar b_2(x,y) $$ is constant, $$\bar b_2(x,y):=\int^y b(s)ds+k_1=\bar b_2(y) $$

Thus,

=R*3.9 Derive the equations of motion of a particle in vertical flight= On our honor, we did this problem on our own, without looking at the solutions in previous semesters or other online solutions.

Problem
$$\displaystyle \text{1-Derive the equations of motion} $$

$$\displaystyle \text{2-Particular case k =0 : verify that y(x) is parabola.} $$

$$\displaystyle \text{3-Consider the case} \ k\neq 0 \text{and} \, v_x0 = 0 $$

Solution

 * $$\displaystyle \text{Motion on the horizontal Axis} $$


 * $$ \displaystyle \sum F_x = ma_x $$


 * $$ \displaystyle \sum F_x = v_x - kv^n \cos \alpha $$


 * $$ \displaystyle \sum F_x = ma_x = {m \frac{dv_x}{dt}} $$


 * $$ \displaystyle {m \frac{dv_x}{dt}} = v_x - kv^n \cos \alpha $$


 * $$\displaystyle \text{No motion on the horizontal axis, so } \, v_x = 0 $$


 * $$\displaystyle \text{Motion on the Vertical Axis} $$


 * $$ \displaystyle \sum F_y = ma_y $$


 * $$ \displaystyle \sum F_y = v_x - kv^n \sin \alpha - mg $$


 * $$ \displaystyle \sum F_y = ma_y = {m \frac{dv_y}{dt}} $$


 * $$\displaystyle  \text{after the intial time  } \, v_y \text{is small compared to } kv^n \sin \alpha  \,\text{and } \, \ mg $$


 * $$\displaystyle \text{From Pythagorean theorem} $$



The Pythagorean theorem can be written as an equation relating the lengths of the sides a, b and c.

$$ \displaystyle a^2 + b^2 = c^2 $$


 * $$\displaystyle \text{In our case} $$


 * $$ \displaystyle \ v_y = a \, \ v_x = b \, \, \ v = c $$
 * $$ \displaystyle \ (v_y)^2 + (v_x)^2 = v^2 $$


 * $$\displaystyle \text{Derive the following} $$
 * $$\displaystyle \, \tan \alpha \ = \frac{dy}{dx} = \frac{\frac{dy}{dt}}{\frac{dx}{dt}} = \frac{v_y}{v_x}$$


 * $$\displaystyle \, \tan \alpha \ = \frac{opposite}{adjacent} = \frac{v_y}{v_x}$$
 * $$\displaystyle \text{Recall that} \ v_x = \frac{dx}{dt}\, \text{and} \ v_y = \frac{dy}{dt}$$
 * $$\displaystyle \text{Hence} $$


 * $$\displaystyle \, \tan \alpha \ = \frac{v_y}{v_x}  = \frac{\frac{dy}{dt}}{\frac{dx}{dt}} = \frac{dy}{dx}$$
 * $$\displaystyle \text{2-Particular case k =0 : verify that y(x) is parabola.} $$

$$ becomes


 * $$\displaystyle \, \ {m a_x = 0 }$$
 * $$\displaystyle \text{No acceleration on the Horizontal axis} $$
 * $$\displaystyle \, \ {m \frac{dv_y}{dt} = -mg}$$
 * $$\displaystyle \, \ {m a_y = -mg}$$


 * $$\displaystyle \text{The only acceleration on the vertical axis is due to the gravity} $$


 * $$\displaystyle \  y(x) \text{is a Parabola} $$


 * $$\displaystyle \text{3-Consider the case} \ k\neq 0 \text{and} \, v_x0 = 0 $$

($$) becomes


 * $$\displaystyle \, \ {v^2 = (v_x)^2 + (v_y)^2}$$


 * $$\displaystyle \, \ {v^2 = (0)^2 + (v_y)^2}$$


 * $$\displaystyle \, \ {v^2 = (v_y)^2}$$


 * $$\displaystyle \text{and} \sin \alpha = 1 $$

($$) becomes

= R*3.10 Use of IFM to Solve L1-ODE-CC and L1-ODE-VC =

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

Given: L1-ODE-CC and L1-ODE-VC
Where L1-ODE-VC refers to Linear First Order Differential Equation with Variable Coefficients and L1-ODE-CC refers to Linear First Order Differential Equation with Constant Coefficients

Problem: Use Integrating Factor Method to solve equation
Use IFM to show that the solution to ($$) is $$ \displaystyle x(t) = [exp\{a(t-t_0)\}]x(t_0) + \int_{t_0}^{t}[exp\{a(t-\tau)\}]bu(\tau)d\tau $$

Identify the integrating factor, the homogenous solution, and the particular solution.

Show that the solution of the ($$) is

$$ \displaystyle x(t) = \left [ \int_{t_0}^{t} exp\{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 $$

Solution
($$):

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

$$ \displaystyle \underbrace{-(ax(t) + bu(t))}_{M(t,x)} + \underbrace{1}_{N(t,x)}\times\dot x = 0 $$

This is of the form $$M(t,x) + N (t,x)\dot x = 0$$, which is the first exactness condition of a differential equation.

Now, $$M_x \neq N_t $$

Thus we multiply by an integrating factor h(x,t) to ($$): such that the equation will now satisfy the second exactness condition for solving a differential equation.

Partially differentiating $$\displaystyle \bar M$$ wrt x

$$\displaystyle \bar M_x = -h(a + 0) + h_x(ax(t) + bu(t)) $$

Partially differentiating $$\displaystyle \bar N$$ wrt t

$$ \displaystyle \bar N_t = h_t $$

For the second exactness condition,

$$ \displaystyle \bar M_x = \bar N_t $$

$$ \displaystyle -h(a + 0) + h_x(ax(t) + bu(t)) = h_t $$

Assuming $$\displaystyle h$$ to be a function of only t, We get

$$ \displaystyle -ha = h_t $$

$$ \displaystyle -a = \frac{h_t}{h} $$

Integrating with a dummy variable $$ \displaystyle\tau $$

$$ \displaystyle -a(\tau) = log(h) $$

Substituting in ($$)

$$ \displaystyle -e^{-a(\tau)}(ax(t)+ bu(t))+e^{-a(\tau)}\dot x = 0 $$

$$ \displaystyle -ae^{-a(\tau)}x(t) + e^{-a(\tau)}\dot x -e^{-a(\tau)}bu(t)=0 $$

$$ \displaystyle \frac {d}{dt} \left ( e^{-a(\tau)}x(t) \right ) -e^{-a(\tau)}bu(t)=0 $$

$$ \displaystyle \frac {d}{dt} \left ( e^{-a(\tau)}x(t) \right ) = e^{-a(\tau)}bu(t) $$

Now integrating on both sides using a dummy variable $$\tau$$

$$ \displaystyle \int_{t_0}^{t} e^{-a(\tau)}x(t)d\tau = \int_{t_0}^{t} e^{-a(\tau)}bu(\tau)d\tau $$

$$ \displaystyle e^{-a(t)}x(t)-e^{-a(t_0)}x(t_0) = \int_{t_0}^{t} e^{-a(\tau)}bu(\tau)d\tau $$

$$ \displaystyle x(t) = \frac {1}{e^{-a(t)}} \left ( e^{-a(t_0)}x(t_0) + \int_{t_0}^{t} e^{-a(\tau)}bu(\tau)d\tau \right )$$

Hence proved the first part of the problem.

The first term on the RHS is the homogenous solution, the second term is the Particular solution. Integrating factor h has already been identified.

Now when a(t) is a variable coefficient, we can not evaluate the integral in equation ($$) without knowing the function a(t).

Thus the integration factor becomes

$$ \displaystyle h = \int_{t_0}^{t} e^{-a(t)dt} $$

which on substituting in ($$) gives

$$ \displaystyle x(t) = \left [ \int_{t_0}^{t} exp\{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 $$

which is the required result.

= R*3.11 Free Vibration of a System of Coupled Pendulums = We did this problem referencing the work of a previous solution. The mediawiki codes of a few mathematical operations have been referred to. The assignment was solved on our own as such.

Problem
1. Using MATLAB Function ode45, integrate Equations (1)-(2) p.14-5 in matrix form (1) p.14-4 for $$ \displaystyle t \in [0,7] $$ and the given Time Stations.

2. Under the same conditions, use (2) p.15-2 to find the solution.

3. Plot the graphs, (a). $$ \displaystyle \theta_1(t) $$ in from Questions 1 and 2 above, and (b). $$ \displaystyle \theta_2(t) $$ likewise.

Given
A System of Equations for a Coupled System of Pendulums

Matrix Form of L2-ODE

Other Constant Parameters such as $$ \displaystyle a=0.3 ,\ l=1, \ k=0.2 ,\ m_1g=3, \ m_2g=6 $$

1. Solution using ode45 function in MATLAB
To obtain the matrix form ($$), first let us divide ($$) by $$ \displaystyle m_1l^2 $$ and ($$) by $$ \displaystyle m_2l^2 $$.

We get,

Combining ($$) and ($$), we get,

MATLAB Solution to ($$) using the Function ode45.

2. Solution using the Generalized form of SC-L1-ODE-CC
The Generalized form of a SC-L1-ODE-CC is written as,

But observing ($$), we see that second term is zero and hence ($$) can be simplified to,

Substituting the values of $$ \displaystyle a, l, k, g, m_1g, m_2g, u_1, u_2 $$ in ($$), we get,

This equation can now be solved in MATLAB to avoid tedious calculations by hand. The code is as follows:

3. Plot of $$ \displaystyle \mathbf {\theta_1(t)}$$ from Q1 and Q2
One can observe that the two curves are coincident, which proves that both methods give the same result.



4. Plot of $$ \displaystyle \mathbf {\theta_2(t)}$$ from Q1 and Q2
One can observe that the two curves are coincident, which proves that both methods give the same result.



= R*3.12 2nd Exactness Condition = On our honor, we did this problem on our own, without looking at the solutions in previous semesters or other online solutions.

Problem
1. Derive (2)p.16-5 by differentiating the definition of g(x,y,y') in (3)p.16-4 with respect to $$ \displaystyle p:= y' $$.

2. Derive (1)p.16-5.

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

Given
$$ \displaystyle \, $$

Solution
1. Take the second derivative of g(x,y,p) from (3)p.16-4 with respect to p.

By substituting Eq(4)p.16-4 into Eq(12.3) results in:

This is equivalent to (2)p.16-5.

2. In order to derive the first relation (1)p.16-5, three equalities must be analyzed:

With the first equality, Eq(12.5), $$ \displaystyle \phi_x $$ can be substituted using the definitions of g and f from (3)-(4)p.16-4.

Taking the derivative and solving for $$ \displaystyle \phi_y $$ yields:

The derivative with respect to x is taken for use in Eq(12.7).

Next, the second equality, Eq(12.6), is analyzed, where $$ \displaystyle \phi_y $$ can be substituted using the definitions of g and f from (3)-(4)p.16-4.

Taking the derivative and solving for $$ \displaystyle \phi_x $$ yields:

The derivative with respect to y is taken for use in Eq(12.7).

Finally, Eq(12.13) and Eq(12.21) are substituted into Eq(12.7) as follows:

This can be rearranged to:

Since $$ \displaystyle f_{xy}=f_{yx} $$, Eq(12.23) then becomes:

which is equivalent to (1)p.16-5.

3. In order to verify that (1)p.16-6 satisfies the 2nd exactness condition, it much satisfy both of the relations in (1)p.16-5 and (2)p.16-5.

By looking at (1)p.16-6, the components g and f can be defined as follows:

It follows that g(x,y,p) can be simplified to:

First, the derivatives of g with respect to x, y, and p are found:

Next, f(x,y,p) can be simplified to:

Then, the derivatives of f with respect to x, y, and p are found:

Substituting these values into (2)p.16-5 results in:

This is true, so the 1st relation is valid.

Substituting these values into (1)p.16-5 results in:

This is true, so the 2nd relation is valid.

Hence, both relations are valid, so the second exactness condition is satisfied for (1)p.16-6. $$ \displaystyle \, $$

=Contributing Members=

=References=