text:
User:Egm6321.f11.team1/report3

= R3.1 Show N1-ODE satisfies certain condition=

Given
Show that the N1-ODE (1) p.13-2

$$ \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 $$

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

$$\frac{h_x}{h}=-\frac{1}{N}(N_x-M_y) \, =: \color{blue}{n(x)}$$

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

Show that (1) p.13-2 includes (1) p.12-4

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

as a particular case.

From lecture notes [[media:pea1.f11.mtg13.djvu|Mtg 13]]

Solution
Part 1:

In this case,

$$N(x,y)= \bar b(x,y)c(y)$$,

$$M(x,y)= a(x) \bar c(x,y) $$

Thus,

$$\displaystyle N_x=c(y) b(x), $$

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

Then (2) p.11-2 will be like:

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

 * $$=\frac{a(x)-b(x)}{\bar b(x,y)}$$

 * $$=\frac{a(x)-b(x)}{\int^x b(s)ds+k_1(y)}$$

This term is only respect to x, and can be written as $$\displaystyle n(x)$$, only if $$\displaystyle k_1(y)=constant$$

Part 2:

(1)p.13-2:

$$ a(x) \bar c(x,y)+ \bar b(x,y)c(y) \,y'=0

$$

When functions b(x,y) and c(x,y) meet the following conditions,

b(x,y) is a function of x only:

$$b(x,y)=b(x)$$

$$c(x,y)=c$$ (c is a constant)

then(1)p.13-2 becomes like:

(2)p.12-4: $$[a(x)y+k_2(x)]+\bar b(x) \,y'=0

$$

which proves that (2) p.12-4 is a particular case of (1)p.13-2

=R*3.2 Show Exactness or determine IFM to make exact=

Given
1st order ODE:

 * $$ \left(\frac{1}{3}x^{3}+d_1\right)(y^{4})y'+(5x^{3}+2)\left(\frac{1}{5}y^{5}+sin(x)+d_2\right)=0$$ $$\displaystyle (1) p. 13-4

$$

From lecture notes [[media:pea1.f11.mtg13.djvu|Mtg 13]]

Find
Show that the above is exact or find the integrating factor $$ h $$ to make it exact

Solution
For the the 1st condition of exactness the given equation must be in the form of:

 * $$ N(x,y)y' + M(x,y) = 0 \!$$  $$\displaystyle (2) p. 7-6$$

[[media:pea1.f11.mtg7.djvu|Mtg 7 (b,x)]]

It has been shown in R3.1 that the integration functions must be constant in order to determine the integration factor. Thus the integration functions and constants will be set to zero for this problem, and $$\displaystyle (1) p. 13-4 $$, becomes:

 * $$ \underbrace{\left(\frac{1}{3}x^{3}\right)(y^{4})}_{N(x,y)}y'+\underbrace{(5x^{3}+2)\left(\frac{1}{5}y^{5}\right)}_{M(x,y)}=0$$

which is in the form of the first exactness condition $$\displaystyle (2) p. 7-6$$ so the 1st condition is satisfied.

For the 2nd exactness condition the partial derivatives must be equal per meeting lecture notes 9, [[media:pea1.f11.mtg9.djvu|Mtg 9]]

 * $$M_y = N_x\!$$  $$\displaystyle (2) p. 9-3$$.

It can be seen that:

 * $$M_y \neq N_x$$

An integrating factor will be found such that the given ODE can be integrated exactly.

The strategy is to get the following equation from lecture notes 13:

 * $$\underbrace{\bar b(x,y)c(y)}_{N(x,y)}\ y' + \underbrace{a(x) \bar c(x,y)}_{M(x,y)}=0        \!$$  $$\displaystyle (1) p. 13-2$$.

into the form of equtaion $$\displaystyle (2) p. 12-2$$

 * $$ y'+a_o(x)y=0 \!$$  $$\displaystyle (2) p. 12-2$$.

So first lets calculate the the inputs to $$\displaystyle (1) p. 13-2$$

 * $$\bar b(x)= \frac{x^3}{3}\!$$
 * $$\bar c(y)= \frac{y^5}{3}\!$$

We also know that

 * $$c(y)= y^4\!$$
 * $$a(x)= 5x^3+2\!$$

Plugging these values into $$\displaystyle (1) p. 13-2$$ yields:

 * $$ (\frac{x^3}{3} y^4) y'+ (5x^3+2) y^5=0\!$$

After some algebra to get in the form of $$\displaystyle (2) p. 12-2$$ the result is:

 * $$\underbrace{1}_{N}\cdot y' + \underbrace{\left(3 + \frac{6}{5x^3}\right)}_{a_0}y =0\!$$

From equation $$\displaystyle (3) p. 11-4$$ the integrating factor can be found as follows:

 * $$h = \exp\int^{x}a_0(s)ds \!$$

with the integration constant equal to zero

Substituting $$ a_0\!$$ yields

 * $$h = \exp\int^{x}\left(3 + \frac{6}{5s^3}\right)ds\qquad \!$$

Now the integral can be evaluated, which yields:

 * $$ h = \exp\left(3x - \frac{3}{5x^2}\right)\!$$

This is the integrating factor to make the ODE given exact.

=R*3.3 Find N1-ODE that is either exact or can be made exact=

Given

 * $$ a(x)=sinx^3 $$

 * $$ b(x)=cosx $$

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

1.Find an N1-ODE of the form (1) p.13-2

 * $$ \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 $$

$$\,(Eq.3.3.1)$$

that is either exact or can be made exact by IFM. (See R3.1)

2.Find the first integral

 * $$\phi(x,y)=k $$

From lecture notes [[media:pea1.f11.mtg13.djvu|Mtg 13]]

Solution
Part 1

 * $$\bar b(x)= \int\limits^x b(s)ds= \int\limits^x cos(s)ds= sin(x) $$

 * $$\bar c(y)= \int\limits^y c(s)ds= \int\limits^y e^{2s}ds= \frac{1}{2} e^{2y}$$

Now Eq 3.3.1 becomes:

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

$$\,(Eq.3.3.2)$$

Eq 3.3.2 is the form of

 * $$M(x,y)+N(x,y)\,y'=0$$ and the first condition of Exactness is satisfied.

$$\,(Eq.3.3.3)$$

The condition below is not only necessary but also sufficient for Eq 3.2 to be an exact differencial equation.

 * $$\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}$$

 * $$\frac{\partial M}{\partial y}=\frac{\partial(\frac{1}{2}sin(x^3)\exp^2y)}{\partial y}=sin(x^3)\exp^2y$$

$$\,(Eq.3.3.4)$$

 * $$\frac{\partial N}{\partial x}=\frac{\partial(sin(x)\exp^2y)}{\partial x}=cos(x)\exp^2y$$

$$\,(Eq.3.3.5)$$

Eq 3.3.4 and Eq 3.3.5 reveals that

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

Hence the Eq.3.3.2 is not exact.

But it can be made exact by using Integrating factor method.Refer to Eq(2), page 11-2 of the lecture notes, and let's multyply Eq 3.3.2 by h(x) in order to have an exact differential equation.

 * $$h(x)=exp[\int^x(-\frac{1}{N}(N_x-M_y))dx]$$

We can rewrite Eq 3.3.2 by cancelling $$e^{2y}$$from both term as:

 * $$\underbrace{sin(x)}_{N(x,y)}{y'}+ \underbrace{\frac{1}{2}sin(x^3)}_{M(x,y)}=0 $$

Now:

 * $$ h(x)=exp[\int^x(-\frac{1}{sin(x)}(cos(x)-0))dx]=exp[\int^x(-\frac{cos(x)}{sin(x)})dx]=exp[-ln(sin(x))]=\frac{1}{sin(x)}$$

$$\,(Eq.3.3.6)$$

Now Exact differential equation is given by

 * $$h(x)[sin(x)e^{2y}y'+\frac{1}{2}sin(x^3)\frac{1}{sin(x)}=0]$$

That is

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

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

$$\,(Eq.3.3.7)$$

Part 2 We know that

 * $$M(x,y)=\phi_x(x,y)$$

$$\,(Eq.3.3.8)$$

 * $$N(x,y)=\phi_y(x,y)$$

$$\,(Eq.3.3.9)$$

Also,

 * $$\phi_x(x,y)=\frac{\partial\phi(x,y)}{\partial x}$$

$$\,(Eq.3.3.10)$$

 * $$\phi_y(x,y)=\frac{\partial\phi(x,y)}{\partial y}$$

$$\,(Eq.3.3.11)$$

By integrating Eq.3.3.10 and 3.3.11 with respect to x, y, respectively, we can have equations as given below.

 * $$\int \phi_x(x,y)dx=\phi(x,y)=\int M(x,y)dx +k(y)$$

$$\,(Eq.3.3.12)$$

 * $$\int \phi_y(x,y)dy=\phi(x,y)=\int N(x,y)dy +k(x)$$

$$\,(Eq.3.3.13)$$

Now we can calculate $$k(y)$$ by differentiating Eq 3.3.12 with respect to y and equating to Eq 3.3.9=>

 * $$k'(y)=N(x,y)=1$$

Now integrate the above equation =>

 * $$k(y)=y+k1$$

Then$$\phi(x,y) $$ is obtained by substituting

$$k(y)$$ in Eq 3.3.12

 * $$\phi(x,y)=\int M(x,y)dx+y+k1$$

That is

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

= R3.4 Construct a class of N1-ODEs =

== Given == Consider a class of N1-ODEs of the form:

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

$$
 * $$\underbrace{\bar b(x,y)c(y)}_{\displaystyle{N(x,y)}}\,y'+\underbrace{a(x)\bar c(x,y)}_{\displaystyle{M(x,y)}}=0$$
 *
$$\displaystyle (Equation\;3.4.1)
 *
$$\displaystyle (Equation\;3.4.1)
 * }
 * }

in which,

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

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

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

Equation 3.4.1satisfies the condition
 * $$\displaystyle \frac{h_x}{h}=-\frac{1}{N}\left(N_x-M_y\right)=:n(x)$$

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

== Find == Construct a class of N1-ODEs, which is the counterpart of Equation 3.x.x, and satisfies the condition
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle \frac{h_y}{h}=\frac{1}{M}\left(N_x-M_y\right)=:m(y)$$
 *
$$\displaystyle (Equation\;3.4.2)
 *
$$\displaystyle (Equation\;3.4.2)
 * }
 * }

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

Solution
The condition Equation (3.4.2) means that the intergrating factor only with respect y. According to this, suppose the N1-ODE we want has the form of:

with

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

$$\displaystyle \bar c(x,y)=\int^x c(s)ds+k_2(y)$$ The partial differential are:

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

$$\displaystyle N_x=b(y)\cdot c(x)$$

$$\displaystyle \frac{h_y}{h}=\frac{1}{M}\left(N_x-M_y\right)=b(y)-a(a):=m(y)$$, which satisfies the condition Equation (3.4.2).

= R*3.5 Derive Equations for Projectile Motion =

Given
Schematic of motion of particle in air:

 * Egm6321.f11.team1.figure1.png

Particle velocity
 * $$v:=\parallel\boldsymbol v \parallel$$

Constants
 * $$k,n\in\mathbb R$$

Mass of particle = $$\displaystyle m$$

Acceleration of gravity = $$\displaystyle g$$

== Find ==

(1) Derive the equations of motion

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

$$
 * $$m\frac{dv_x}{dt}=-kv^n\cos\alpha$$
 *
$$\displaystyle (Equation\;3.5.1)
 *
$$\displaystyle (Equation\;3.5.1)
 * }
 * }

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

$$
 * $$m\frac{dv_y}{dt}=-kv^n\sin\alpha-mg$$
 *
$$\displaystyle (Equation\;3.5.2)
 *
$$\displaystyle (Equation\;3.5.2)
 * }
 * }

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

 * $$\tan\alpha=\frac{dy}{dx}=\frac{\frac{dy}{dt}}{\frac{dx}{dt}}=\frac{v_y}{v_x}$$

(2) For the particular case $$\displaystyle k=0$$: Verify that $$\displaystyle y(x)$$ is a parabola.

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

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

$$
 * $$m\frac{dv_y}{dt}=-k(v_y)^n-mg$$
 *
$$\displaystyle (Equation\;3.5.3)
 *
$$\displaystyle (Equation\;3.5.3)
 * }
 * }

 * (3.1) Is Equation 3.5.3 either exact or can be made exact using Integrating Factor Method? Find $$\displaystyle v_y(t)$$ and $$\displaystyle y(t)$$ for $$\displaystyle m$$ constant.

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

Part (1)
For a non-accelerating particle in motion, the sum of the forces is zero. Consider the forces in the x-direction:

$$\sum F_x=0=ma_x+kv^n\cos\alpha=m\frac{dv_x}{dt}+kv^n\cos\alpha$$

Now consider the forces in the y-direction.

$$\sum F_y=0=ma_y+kv^n\sin\alpha+mg=m\frac{dv_y}{dt}+kv^n\sin\alpha+mg$$

By given and definition of norm :

$$v=\parallel\boldsymbol v\parallel=\sqrt{(v_x)^2+(v_y)^2}$$

Thus it is clear that

Apply definition of slope to a differential portion.

$$\tan\alpha=\frac{\rm opposite}{\rm adjacent}=\frac{dy}{dx}$$

Now apply chain rule and definition of velocity.

$$\frac{dy}{dx}=\frac{dy}{dt}\frac{dt}{dx}=\frac{\frac{dy}{dt}}{\frac{dx}{dt}}=\frac{v_y}{v_x}$$

Put it all together.

Part (2)
Consider Equation (3.5.1) and Equation (3.5.2) for the case of $$\displaystyle k=0:$$

$$m\frac{dv_x}{dt}=0$$

$$m\frac{dv_y}{dt}=0-mg$$

Which implies

$$\frac{dv_x}{dt}=0$$

$$\frac{dv_y}{dt}=-g$$

Integrate

$$\displaystyle v_x(t)=v_{x0}$$

$$\displaystyle v_y(t)=-gt+v_{y0}$$

Integrate again to calculate position.

$$\displaystyle x(t)=v_{x0}t+x_0$$

$$y(t)=-g\frac{t^2}{2}+v_{y0}t+y_0$$

Solve $$\displaystyle x(t)$$ for $$\displaystyle t$$ so that we can eliminate time dependency from $$\displaystyle y(t)$$.

$$t=\frac{x-x_0}{v_{x0}}$$

Entering this into $$\displaystyle y(t)$$ yields

This is the form of a paraboloid.

Section 3.1
To test Equation 3.5.3 for exactness, it must pass the two Exactness Conditions. Rearrange as such:

$$\left[k(v_y)^n+mg\right]+\left[m\right]\frac{dv_y}{dt}=0$$

If we define the following values:

$$\displaystyle M(v_y,t):=k(v_y)^n+mg$$

$$\displaystyle N(v_y,t):=m$$

Then we have

$$\displaystyle M(v_y,t)+N(v_y,t)v_y'=0$$

This satisfies the First Exactness Condition. The second is satisfied if

$$\frac{\partial M(v_y,t)}{\partial v_y}=\frac{\partial N(v_y,t)}{\partial t}$$

But (assuming mass $$\displaystyle m$$ is a function of time)

$$kn(v_y)^{n-1}\ne \frac{dm}{dt}$$

Thus the Second Exactness Condition is not satisfied. Let us try to transform the ODE with an integrating factor to make it exact. We need to find an $$\displaystyle h(v_y,t)$$ so that the following N1-ODE is exact:

$$h(v_y,t)\left[M(v_y,t)+N(v_y,t)v_y'\right]=0$$

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

$$
 * $$\left[h(v_y,t)k(v_y)^n+h(v_y,t)mg\right]+\left[h(v_y,t)m\right]\frac{dv_y}{dt}=0$$
 *
$$\displaystyle (Equation\;3.5.4)
 *
$$\displaystyle (Equation\;3.5.4)
 * }
 * }

Attempting to find a $$\displaystyle h(v_y,t)$$ that makes Equation 3.5.4 exact is extremely difficult, as explained in R2.11. To put it simply, the equation for $$\displaystyle h(v_y,t)$$ is a non linear PDE, so it has varying coefficients. For this reason, I claim that there does not exist an Integrating Factor of this form. However, there are two cases in which it is possible to find an Integrating Factor. In both cases I will be pulling equations from the class lecture notes.

CASE 1

Suppose $$\displaystyle h_t(v_y,t)=0$$, thus $$\displaystyle h$$ is a function of $$\displaystyle v_y$$ only. From the notes, we define

$$n(v_y):=-\frac{1}{N}(N_t-M_{v_y})=\frac{1}{m}\left[\frac{dm}{dt}-kn(v_y)^{n-1}\right]$$

Also from the same source,

CASE 2

Now suppose $$\displaystyle h_{v_y}(v_y,t)=0$$, thus $$\displaystyle h$$ is a function of $$\displaystyle t$$ only. From the notes cited above, we define

$$m(t):=-\frac{1}{M}(N_t-M_{v_y})=\frac{1}{k(v_y)^n-mg}\left[\frac{dm}{dt}-kn(v_y)^{n-1}\right]$$

From R*2.12 we know $$\displaystyle h(t)$$:

The next step of this problem is to find $$\displaystyle v_y(t)$$ and $$\displaystyle y(t)$$ for $$\displaystyle m$$ constant. Solving the ODE directly is challenging due to the complexity $$\displaystyle (v_y)^n$$ poses. To counter this problem I will consider a few common cases.

$$\displaystyle n=0$$

This case represents vertical motion without air resistance. Consider Equation (3.5.3).

$$m\frac{dv_y}{dt}=-k-mg$$

$$v_y(t) = -\frac{k+mg}{m}t+v_{y0}$$

$$y(t)= -\frac{k+mg}{2m}t+^2v_{y0}t+y_0$$

$$\displaystyle n=1$$

This case represents vertical motion with a linear air resistance factor. Consider Equation (3.5.3).

$$m\frac{dv_y}{dt}=-kv_y-mg$$

This is a L1-ODE solvable via Integration Factor Method, using $$h=\int \exp\left(\frac{k}{m} \right )dt$$. Using this yields the solution

$$v_y(t)=C_1\exp^{-\frac{k}{m}t}-\frac{gm}{k}$$

$$y(t)=-C_1\frac{k}{m}\exp^{-\frac{k}{m}t}-\frac{gm}{k}t+C_2$$

$$\displaystyle n=2$$

This case represents vertical motion with a quadratic air resistance factor. Consider Equation (3.5.3).

$$m\frac{dv_y}{dt}=-kv_y^2-mg$$

This is a N1-ODE. I will choose to use Wolfram-Alpha to solve this equation.

$$v_y(t)=\frac{\sqrt g\sqrt m\tan(\frac{C_1\sqrt g\sqrt k m-\sqrt g\sqrt k t}{\sqrt m})}{\sqrt k}$$

$$y(t)=\frac{2m\log\left( \cos\left( \frac{\sqrt g\sqrt k(C_1m-t)}{\sqrt m}\right)\right)}{t-C_1m}+C_2$$

$$\displaystyle n=3$$

This case represents vertical motion with a cubic air resistance factor. Consider Equation (3.5.3).

$$m\frac{dv_y}{dt}=-kv_y^2-mg$$

This is another N1-ODE. I used Wolfram-Alpha to solve this equation, but it yielded an implicit equation for $$\displaystyle v_y(t)$$.

Note that an implicit form of $$\displaystyle v_y(t)$$ makes it impossible to solve for $$\displaystyle y(t)$$.

$$\displaystyle n\geq4$$

This case represents vertical motion with an resistance factor that is proportional to some power (greater than 3) of the velocity. Solving this via Wolfram-Alpha yields similarly complex implicit solutions as in the $$\displaystyle n=3$$ case. Thus any further investigation is non informative.

Section 3.2
I need to find $$\displaystyle v_y(t)$$ and $$\displaystyle y(t)$$ for $$\displaystyle m=m(t)$$, which is defined below.

$$\displaystyle n=0$$

This case represents vertical motion without air resistance. Consider Equation (3.5.3).

$$m(t)\frac{dv_y}{dt}=-k-m(t)g$$

$$\frac{dv_y}{dt}=-\frac{k}{m(t)}-g$$

$$dv_y=\left[-\frac{k}{m(t)}-g\right]$$

Use the equation $$\displaystyle m(t)=-\frac{m_0-m_1}{t_1}t-m_0$$ to define mass on the interval $$\displaystyle\left[0,t_1 \right ]$$. It is derived from simple slope-intercept equation. Elsewhere $$\displaystyle m(t)=m_1$$.

Note change to dummy integration variable $$\displaystyle s$$.

$$v_y(t)=\int_{0}^{t}\left[-\frac{k}{m(s)}-g \right ]ds$$

$$v_y(t)=\int_{0}^{t_1}\left[-\frac{k}{m(s)}\right]ds+\int_{t_1}^{t}\left[-\frac{k}{m_1}\right]ds+\int_{0}^{t}\left[-g\right ]ds$$

$$v_y(t)=\int_{0}^{t_1}\left[-\frac{k}{-\frac{m_0-m_1}{t_1}s-m_0}\right]ds-\frac{k}{m}(t-t_1)-gt+C_1$$

$$v_y(t)=\left[k\frac{t_1}{m_0-m_1}\ln\left(\frac{m_0-m_1}{t_1}s+m_0 \right )\right]_{0}^{t_1}-\frac{k}{m}(t-t_1)-gt+C_1$$

$$v_y(t)=k\frac{t_1}{m_0-m_1}\left[\ln(2m_0-m_1)-\ln(m_0)\right ]-\frac{k}{m_1}(t-t_1)-gt+C_1$$

$$v_y(t)=k\frac{t_1}{m_0-m_1}\ln\left(\frac{2m_0-m_1}{m_0}\right)-\left(\frac{k}{m_1}-g \right )t-\frac{kt_1}{m_1}+C_1$$

And thus it follows that

$$y(t)=k\frac{t_1}{m_0-m_1}\ln\left(\frac{2m_0-m_1}{m_0}\right)t-\left(\frac{k}{m_1}-g \right )\frac{t^2}{2}-\frac{kt_1}{m_1}t+C_1t+C_2$$

$$\displaystyle n\geq1$$

Further cases introduce two functions of $$\displaystyle t$$ (which are $$\displaystyle v_y(t)$$ and $$\displaystyle m(t)$$) that are incorporated into an ODE. These are feasible problems but beyond the scope of this report.

= R*3.6 Derive the equations of motion of the Double Pendulums =

Find
1.Derive the equations of motion
 * {| style="width:100%" border="0" align="left"

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

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

\displaystyle m_2l^2 \ddot{\theta_2} = -ka^2(\theta_2-\theta_1)-m_2gl\theta_2+ u_2l $$ $$ 2.Write in matrix form
 *
$$\displaystyle
 * }
 * }

Solution
For the left arm: 'M' is the torque relative to hinge point

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

\displaystyle \sum M=M_u+M_k+M_G $$ $$ 'I' is the moment of inertia '$$\alpha$$' is the angular acceleration
 *
$$\displaystyle (Equation\;3.6.1 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \sum M=I\cdot\alpha $$
 *

 * }
 * }

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

\displaystyle I_1=m_1l^2 $$
 *

 * }
 * }

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

\displaystyle \alpha=\ddot{\theta_1} $$
 *

 * }
 * }

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

\displaystyle M_u=u_1 \cdot l \cdot \cos \theta_1 \approx u_1 \cdot l $$
 *

 * }
 * }

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

\displaystyle M_k=F_k \cdot a \cdot \cos \theta_1 =k(a \cdot \sin \theta_2 -a \cdot \sin \theta_1) \cdot a \cdot \cos \theta_1 \approx -ka^2(\theta_1 - \theta_2) $$
 *

 * }
 * }

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

\displaystyle M_G=-m_1g \cdot l \cdot \sin \theta_1 \approx -m_1gl \theta_1 $$ Apply to equation 3.6.1:
 *

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

\displaystyle m_1l^2 \ddot{\theta_1} = -ka^2(\theta_1-\theta_2)-m_1gl\theta_1+ u_1l $$ $$ Similarly, we can get the equation of motion for the right arm:
 *
$$\displaystyle (Equation\; 3.6.2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle m_2l^2 \ddot{\theta_2} = -ka^2(\theta_2-\theta_1)-m_2gl\theta_2+ u_2l $$ $$
 *
$$\displaystyle (Equation\; 3.6.3)
 * }
 * }

Linear time-variant systems
 * {| style="width:100%" border="0" align="left"

\displaystyle \dot{x}(t)=A(t)x(t)+B(t)u(t) $$
 *

 * }
 * }

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

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

 * }
 * }

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

\displaystyle u:= \begin{Bmatrix} u_1l\\u_2l \end{Bmatrix} \in \mathbb {R}^{2 \times 1} $$
 *

 * }
 * }

to find A and B in the following format

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

\displaystyle \begin{bmatrix} \dot \theta_1\\ \ddot \theta_1\\ \dot \theta_2\\ \ddot \theta_2 \end{bmatrix} = \begin{bmatrix} & &  & \\ &  &  & \\ &  &  & \\ &  &  & \end{bmatrix} \begin{bmatrix} \theta_1\\ \dot \theta_1\\ \theta_2\\ \dot \theta_2 \end{bmatrix} + \begin{bmatrix} & \\ & \\ & \\ & \end{bmatrix} \begin{bmatrix} u_1l\\ u_2l \end{bmatrix} $$ $$
 *
$$\displaystyle (Equation\; 3.6.4)
 * }
 * }

finally, the matrix is:

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

\displaystyle \begin{bmatrix} \dot \theta_1\\ \ddot \theta_1\\ \dot \theta_2\\ \ddot \theta_2 \end{bmatrix} = \begin{bmatrix} 0&1 &0  &0 \\ \displaystyle -\frac{ka^2}{m_1l^2}-\frac{g}{l} &0 & \displaystyle \frac{ka^2}{m_1l^2}  &0 \\ 0 &0 &0  &1 \\ \displaystyle \frac{ka^2}{m_2l^2}&0  & \displaystyle -\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 \\ \displaystyle \frac{1}{m_1l^2}&0 \\ 0&0\\ 0&\displaystyle \frac{1}{m_2l^2} \end{bmatrix} \begin{bmatrix} u_1l\\ u_2l \end{bmatrix} $$ $$
 *
$$\displaystyle (Equation\; 3.6.5)
 * }
 * }

= R*3.7 =

R*3.7 Question from meeting 15, page 2: Use IFM to show that the solution of (2) below is (3) underneath. $$\dot x(t)= ax(t) + bu(t)$$ $$x(t)=[\exp\{a(t-t_0)\}]x(t_0)+\int^t_{t_0}[\exp\{a(t-\tau)\}]\,b \,u(\tau)\, d \tau$$ From lecture notes [[media:pea1.f11.mtg15.djvu|Mtg 15]]

Solution
The solution requires an understanding of how the Euler Integrating Factor Method (IFM) is based on the 1st and 2nd exactness conditions. Please note that the equations below for the Euler IFM were derived in a previous homework assignment and noted again for clarity. The derivation builds to the solution. First Exactness Condition of N1-ODEs If an N1-ODE is exact then it has a particular form of M(x,y) + N(x,y)y' = 0 where $$ y' = \frac{dy}{dx}$$
The appended derivations to this point are from meeting 8 Second Exactness Condition of N1-ODEs Now, we must derive the 2nd exactness condition. A general ND-ODE is exact if for G the following relations exist: $$\frac{d\phi}{dx} = G$$ $$\phi(x,y) = k$$ $$\frac{d\phi(x,y(x))}{dx} = G(y',y,x) = 0$$ Let $$\phi(x,y)$$ be a smooth function, then for the 2nd exactness condition we have $$M_y(x,y) = \frac {\partial^2\phi(x,y)}{\partial x\partial y} = N_x(x,y) = \frac{\partial^2\phi(x,y)}{\partial y\partial x}$$
The appended derivations to this point are from meeting 9 If an N1-ODE satisfies the 1st exactness condition but not the 2nd, then the N1-ODE can be transformed by using the Euler Integrating Factor Method (IFM). Assume the conditions below. $$M(x,y) + N(x,y)y' = 0 \And M_y(x,y) \ne N_x(x,y)$$ The transformation of the given N1-ODE to a form that fulfills both exactness conditions begins by finding an integrating factor h(x,y). For condition 1, the substitution of h gives $$(hM) + (hN)y' = \bar{M} + \bar{N}y' = 0$$ The key is to derive a solution using $$\bar{M} = hM \And \bar{N} = hN$$ The derivations are as follows: $$\bar{M}_y = h_yM + hM_y = \bar{N}_x = h_xN + hN_x$$ So the Euler IFM gives the following solution using h(x,y) as the transformation. $$h_xN - h_yM + h(N_x - M_y) = 0 $$
The cumulative derivations to this point are from meetings 10-11 But in our case of this problem, the following equation is the direct basis for the derivation. The inhomogeneous form of this equation has a solution based on meeting 11. So the IFM takes a different derivation path. The updated solution process begins here for report 3. $$\underbrace{-a \,x}_{\displaystyle\color{blue}{M(t,x)}} + \underbrace{\color{blue}{1}}_{\displaystyle\color{blue}{N(t,x)}} \cdot dx/dt = bu(t) $$ The 1st order linear differential equation is a function of t with two variables x(t) and u(t). So let us rewrite the equation as $$-ax + x' = bu = M + Nx'$$ Note that M = -ax and N = 1, so that $$\frac{h_t}{h} = \frac{1}{\N}(N_t - M_x) = (0 - a) = n(s)$$ $$\int_{t_0}^t\frac{h_t}{h} = \int_{t_0}^t(-a)$$ The equation reduces to $$\ln h = -a(t-t_0)$$ Which can be exponentiated to give the integrating factor $$ h = \exp ({\ln h}) = \exp -a(t-t_0)$$ Once the integrating factor is found, the following identity is used to integrate for hx. $$\frac{h_t}{h} = -a$$ So rearrangement gives $$h_t = ha = \dot {h}$$ The substitution into the 1st exactness condition for the inhomogenous condition gives $$h\dot {x} + \dot {h} x = \dot{hx} = hbu$$ Integrate both sides and get $$\int_{t_0}^t{\dot {hx}} = \int_{t_0}^t{b*u}*dt$$ The use of the dummy variable tau and rearrangement with respect to the integration constant gives $$x(t)=[\exp\{a(t-t_0)\}]x(t_0)+\int^t_{t_0}[\exp\{a(t-\tau)\}]\,b \,u(\tau)\, d \tau$$ The first term on the left is the homogeneous solution, and the 2nd term on the right is the particular solution.

References for R3.7 Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 9) [[media:pea1.f11.mtg9.djvu|Mtg 9]] 8 Sep 2011. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 10) [[media:pea1.f11.mtg10.djvu|Mtg 10]] 8 Sep 2011. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 11) [[media:pea1.f11.mtg11.djvu|Mtg 11]] 13 Sep 2011. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 15) [[media:pea1.f11.mtg15.djvu|Mtg 15]] 22 Sep 2011

= R*3.8 =

R*3.8 Question from meeting 15, page 4: Generalize (2) p. 15-2 to the case of linear time-variant system (1) p. 14-4. See (1) p. 15-2. Verify that your expression is indeed the solution for (1) p.14-4. $$\mathbf{x}(t) = \left[\exp \{\mathbf{A}(t-t_0) \} \right] \, \mathbf{x}(t_0) + \int^t_{t_0} \left[\exp \{ \mathbf{A} (t-\tau) \} \right] \mathbf{B} \, \mathbf{u}(\tau) \, d\tau$$ $$\mathbf{\dot[x]}(t) = \mathbf{A}(t) \,\mathbf{x}(t) + \mathbf{B}(t)\, \mathbf{u}(t)$$ From lecture notes [[media:pea1.f11.mtg15.djvu|Mtg 15]]

Solution
The equation (2) from p. 15-2 was for the case of n = 1. But the solution can be generalized for all n by simply applying the same derivation to the equation in matrix form. $$\mathbf{\dot[x]}(t) = \mathbf{A}(t) \,\mathbf{x}(t) + \mathbf{B}(t)\, \mathbf{u}(t)$$

The derivation path is similar since the solution of a scalar linear 1st order differential equation is the same for a system of such equations.

The 1st order linear differential equation is a function of t with two matrices x(t) and u(t) and two varying coefficient matrices a(t) and b(t). So let us rewrite the equation as $$-\mathbf{A}\mathbf{X} + \mathbf{X}' = \mathbf{B}\mathbf{U} = \mathbf{M} + \mathbf{N}\mathbf{X}'$$ $$\frac{\mathbf{h_t}}{\mathbf{h}} = \frac{1}{\mathbf{N}}(\mathbf{N_t} - \mathbf{M_x}) = (0 - \mathbf{A}) = \mathbf{n(s)}$$ So rearrangement gives $$ x(t) = \left[\exp\int^t_(t_0)\mathbf{A}(\mathbf{\tau}d\tau\right]\mathbf{x}(t_0) + \int^t_{t_0}\left[exp \int^t_{\tau}\mathbf{A}(s)ds \right]\mathbf{b}(\mathbf{\tau})\mathbf{u(\tau)}\, d\tau $$

References for R3.8 Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 11) [[media:pea1.f11.mtg11.djvu|Mtg 11]] 13 Sep 2011. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 14) [[media:pea1.f11.mtg14.djvu|Mtg 14]] 20 Sep 2011. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 15) [[media:pea1.f11.mtg15.djvu|Mtg 15]] 22 Sep 2011.

= R*3.9 = R*3.9 Question from meeting 15, page 5: Verify that (1) satisfies (2)-(3). The equations (1) to (3) are shown from top to bottom below. $$\mathbf{\Phi}(t,t_0) = \exp \{\mathbf{A}(t-t_0) \}$$ $$\displaystyle\frac{d}{dt} \mathbf{\Phi}(t,t_0) = \mathbf{A} \, \mathbf{\Phi}(t,t_0)$$ $$\mathbf \Phi (t_0,t_0) = \mathbf I$$ From lecture notes [[media:pea1.f11.mtg15.djvu|Mtg 15]]

Solution
The derivation of a matrix is a direct derivation of a linear system. So it follows the general rules of derivation and matrix algebra. The derivative of an exponential function as a scalar is the same as that for a linear system in matrix algebraic notation. Therefore, the simple rules of derivation apply to prove that (1) satisfies (2) $$\frac {d}{dt} {\mathbf{\Phi}(t,t_0)} = \frac {d}{dt} \exp \{\mathbf{A}(t-t_0) \}$$ $$\frac {d}{dt} {\mathbf{\Phi}(t,t_0)} = \frac {d}{dt} [\mathbf{A}(t-t_0)] * \exp \{\mathbf{A} (t-t_0) \}$$ This simply reduces to show that (1) satisfies (2). $$\displaystyle\frac{d}{dt} \mathbf{\Phi}(t,t_0) = \mathbf{A} \, \mathbf{\Phi}(t,t_0)$$ In addition, the identity matrix is derived from general matrix algebra. $${\mathbf{\Phi}(t_0,t_0)} = \exp \{\mathbf{A}(t_0-t_0) \} = \exp \{\mathbf{A}(0) \} $$ $${\mathbf{\Phi}(t_0,t_0)} = \exp {\begin{bmatrix} 1     & \cdots & 0      \\ \vdots & \ddots & \vdots \\ 0     & \cdots & 1 \end{bmatrix}} $$ Therefore, the substitutions give the identity matrix, which is a matrix with values of 1 along the diagonal and 0 elsewhere.

References for R3.9 King, A.C., J. Billingham, and S.R. Otto. Differential Equations: Linear, Nonlinear, Ordinary, Partial. New York: Cambridge University Press, 2003. Oulia, Masoud and David E. Stevens. Fundamentals of Engineering Exam, 2nd Edition. Boston: Barron's Educational Services Inc., 2008. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 15) [[media:pea1.f11.mtg15.djvu|Mtg 15]] 22 Sep 2011.

= R3.10 Free vibration of coupled pendulums =

== Given ==

The equations of motion of free vibration coupled pendulums are
 * {| style="width:100%" border="0" align="left"

$$
 * $$m_1l^2\ddot{\theta_1}=-ka^2(\theta_1-\theta_2)-m_1gl\theta_1+u_1l$$
 *
$$\displaystyle (Equation\;3.10.1)
 *
$$\displaystyle (Equation\;3.10.1)
 * }
 * }
 * $$m_2l^2\ddot{\theta_2}=-ka^2(\theta_2-\theta_1)-m_2gl\theta_2+u_2l$$

A specific case of this coupled pendulums model:
 * Pendulums: $$a=0.3,\,l=1,\,k=0.2$$
 * $$m_1g=3,\,m_2g=6$$
 * No applied forces: $$\displaystyle u_1=u_2=0$$
 * Initial conditions:
 * $$\theta_1(0)=0,\dot\theta_1(0)=-2$$
 * $$\theta_2(0)=0,\dot\theta_2(0)=+1$$

1)
Use matlab's ode45 command to integrate the coupled pendulums system in matrix form for $$t\in [0,7]$$

2)
Find the solution of this coupled pendulums system by using
 * $$\mathbf{x}(t)=[exp{\mathbf{A}(t-t_0)}]\mathbf{x}(t_0)+\int_{t_0}^t[exp{\mathbf{A}(t-\tau)}]\mathbf{B}\mathbf{u}(\tau)d\tau$$

3)
Plot $$\displaystyle \theta_1(t)$$ and $$\displaystyle \theta_2(t)$$.

1)
Use matlab code ode45 to solve the coupled pendulums system, and plot the solution $$\displaystyle \theta_1$$ and $$\displaystyle \theta_2$$. Matlab code: hw3_problem10.m

=== 2) === The equations of motion Equation (3.10.1) can be written in matrix form
 * $$\mathbf{\dot{X}}(t)=\mathbf{A}(t)\mathbf{x}(t)+\mathbf{B}(t)\mathbf{u}(t)$$

The solution is:
 * $$\displaystyle \mathbf{x}(t)=[exp{\mathbf{A}(t-t_0)}]\mathbf{x}(t_0)+\int^t_{t_0}[exp{\mathbf{A}(t-\tau)}]\mathbf{B}\mathbf{u(\tau)}d\tau$$

In this case,
 * $$\mathbf{x}:=\left\lfloor\theta_1\,\dot\theta_1\,\theta_2\,\dot\theta_2\right\rfloor^T$$
 * $$\mathbf{u}:=\begin{Bmatrix}

u_1l\\ u_2l \end{Bmatrix}$$ The equation of motion is:
 * $$\begin{bmatrix}

\dot{\theta_1}\\ \ddot{\theta_1}\\ \dot{\theta_2}\\ \ddot{\theta_2} \end{bmatrix}=\begin{bmatrix} 0 & 1 & 0 & 0\\ -\frac{ka^2}{m_1l^2}-\frac{g}{l} & 0 & \frac{ka^2}{m_1l^2} & 0\\ 0 & 0 & 0 & 1\\ \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_1l^2} & 0\\ 0 & 0\\ 0 & \frac{1}{m_2l^2} \end{bmatrix}\begin{bmatrix} u_1l\\ u_2l \end{bmatrix}$$ Therefore, the solution is:
 * $$\displaystyle \mathbf{x}(t)=[exp{\mathbf{A}t}]\mathbf{x}(t_0)$$

which is
 * {| style="width:100%" border="0" align="left"

\theta_1\\ \dot\theta_1\\ \theta_2\\ \dot\theta_2 \end{bmatrix}=exp{\begin{bmatrix} 0 & t & 0 & 0\\ -9.8588t & 0 & 0.0588t & 0\\ 0 & 0 & 0 & t\\ 0.0298t & 0 & -9.8298t & 0 \end{bmatrix}}\begin{bmatrix} 0\\ -2\\ 0\\ 1 \end{bmatrix} $$ $$ To calculate the matrix exponential, we use Matlab code expm. Matlab code: matrix_exp.m
 * $$\begin{bmatrix}
 * $$\begin{bmatrix}
 *
$$\displaystyle (Equation\;3.10.2)
 * }
 * }

3)
To get the plot of Q1, we use the MATLAB code in 1). As shown, the red line is the solution of Q1 $$\displaystyle \theta_1$$ and the green line is $$\displaystyle \theta_2$$.

And, this is the MATLAB code for plot the solution of Q2. Matlab code: plot2.m

As shown, the red is $$\displaystyle \theta_1$$, and the blue line is $$\displaystyle \theta_2$$.

=*R3.11 SC_L1_ODE_CC=

Given
Use (2)-(3) p.15-4 together with (1) p.14-4 to show (3) p.15-3. (2) p.15-4

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

$$\,(Eq.11.1)$$

(3) p.15-4

 * $$\mathbf \Phi (t_0,t_0)= \mathbf I$$

$$\,(Eq.11.2)$$

(1) p.14-4

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

$$\,(Eq.11.3)$$

(3)p.15-3

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

$$\,(Eq.11.4)$$

Solution
Substituting$$\mathbf{x}(t)$$ in Eq11.1 by $$\mathbf{\phi}(t,t_0)$$
$$\,(Eq.11.5)$$

to obtain the differential equation of the state transition matrix, we get:

 * $$ \dot\phi (t,t_0)=A \mathbf{\phi}(t,t_0) + B u(t)$$

Re-arranging equation 11.5 in the following form:

 * $$\underbrace{1}_{N}\dot\phi - \underbrace{A \phi(t,t_0)}_{M}=Bu(t)$$

$$\,(Eq.11.6)$$

It is clear that this equation complies with the first condition of exactness.

So to make this equation exact we will apply the Euler Integrating Factor Method.

It has been previously shown that in order to meet the second condition of exactness we can multiply equation 11.6 by a function h to obtain the following:

 * $$\underbrace{h1}_{N}\dot\phi - \underbrace{hA \phi}_{M}=hBu$$

Now the second condition of exactness may be applied, where x is the dependent variable and t is the independent variable.

 * $$\underbrace{(h \frac{\partial M}{\partial{\phi}}+M \frac{\partial h}{\partial{\phi}})}_{\frac{\partial M}{\partial{\phi}}}=\underbrace{(h \frac{\partial N}{\partial{t}}+N \frac{\partial h}{\partial{t}})}_{\frac{\partial N}{\partial{t}}}$$

Now for the special case where $$h_x$$ equals zero we obtain the following:

 * $$hM_\phi=hN_t+Nh_t$$

Which may be rearranged to obtain:

 * $$hN_t+Nh_t-hM_\phi=0$$

We can now solve for h as a function of t.

 * $$h(t)=e^{-\int^t_{t_0}\frac{1}{N}(N_t-M_\phi)dt}$$

Where:
 * $$N=1$$

 * $$N_t=\frac{\partial 1}{\partial t}=0$$

 * $$M=-A \phi$$

 * $$M_\phi=-A$$

 * $$h(t)=e^{\int^t-Ads}=e^{-At}$$

$$\,(Eq.11.7)$$

Substituting 11.7 in the equation 11.6 we get

 * $$\underbrace{e^{-At} \dot\phi(t,t_0)}_{f'(x)\cdot g(x)}-\underbrace{e^{-At} \dot\phi(t,t_0)}_{f(x)\cdot g'(x)}=e^{-At} Bu(t)

$$
$$\,(Eq.11.8)$$

We should recognize equation 11.8 as the derivative of $$ (h\phi)$$ , by using the relation given in equation 11.2:

 * $$\frac{d(h\phi)}{dt}=hBu$$

Therefore, to find the solution we integrate both sides in the interval
 * $$t_0 \le \tau \le t$$

 * $$\int^t_{t_0} \frac{d(e^{-A\tau}\phi)}{d\tau}d\tau=\int^t_{t_0} e^{-A\tau}Bu(\tau)d\tau

$$
$$\,(Eq.11.9)$$

Equation 11.9 yields:

 * $$e^{-A(t-t_0)}\phi(t,t_0)-e^{-A(t_0-t_0)}\phi(t_0,t_0)+\int^t_{t_0}e^{-A\tau}Bu(\tau)d\tau$$

$$\,(Eq.11.10)$$

Re-arranging terms in equation 11.10 we obtain:

 * $$\phi(t,t_0)=e^{A(t-t_0)} \phi(t_0,t_0)+\int^t_{t_0} e^{A(t-\tau)} Bu(\tau)d\tau$$

$$\,(Eq.11.11)$$

Substituting $$\phi(t,t_0)$$ in the equation 11.11 by $$x(t)$$ we obtain the differential equation in the form of equation 11.4:

 * $$x(t)=e^{A(t-t_0)}x(t_0)+\int^t_{t_0}e^{A(t-\tau)}bu(\tau)d\tau$$

=R*3.12 Linear time-variant system, Rocket Roll Control in matrix notation=

Given

 * $$ \displaystyle \dot{\phi}=\omega $$
$$\displaystyle (1) p. 16-2

$$

 * $$ \displaystyle \dot{\omega}=-\frac{1}{\tau }\omega+\frac{Q}{\tau }\delta $$
$$\displaystyle (2) p. 16-2

$$

 * $$ \displaystyle \dot{\delta}=u $$
$$\displaystyle (3) p. 16-2

$$

See lecture notes [[media:pea1.f11.mtg16.djvu|Mtg 16 (b)]] for problem description.

 * $$ \displaystyle \mathbf{\dot{x}}(t)=\mathbf{A}(t)\, \mathbf{x}(t)+\mathbf{B}(t)\, \mathbf{u}(t) $$
$$\displaystyle (1) p. 14-4

$$

Reference lecture notes[[media:pea1.f11.mtg14.djvu|Mtg 14]] for form of equation.

Find
Put (1-3)p.16-2 in the form of (1)p.14-4

Solve

 * $$ \displaystyle \begin{bmatrix}

\dot{\phi }\\ \dot{\omega }\\ \dot{\delta } \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0\\ 0 & -\frac{1}{\tau } & \frac{Q}{\tau }\\ 0 & 0 & 0 \end{bmatrix} \begin{bmatrix} \phi \\ \omega \\ \delta \end{bmatrix}

+ \begin{bmatrix} 0\\ 0\\ 1 \end{bmatrix} \mathbf {u}(t) $$

= R*3.13 Second exactness condition =

Given

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

\displaystyle G(x,y,y',y)=g(x,y,p)+f(x,y,p)y=0 $$ $$
 *
$$\displaystyle
 * }
 * }

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

\displaystyle g(x,y,p):=\phi_x (x,y,p)+\phi_y (x,y,p)p $$ $$
 *
$$\displaystyle
 * }
 * }

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

\displaystyle f(x,y,p):=\phi_p (x,y,p) $$ $$
 *
$$\displaystyle
 * }
 * }

Find
1.Derive the 2nd relation in the 2nd exactness condition 2.Derive the 1st relation in the 2nd exactness condition 3.Verify that $$x(y')^2+yy'+(xy)y''=0$$satisfies the 2nd exactness condition

1.Derive the 2nd relation in the 2nd exactness condition

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

\displaystyle G(x,y,y',y)=g(x,y,p)+f(x,y,p)y=0 $$ $$
 *
$$\displaystyle (Equation\;3.13.1 )
 * }
 * }

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

\displaystyle g(x,y,p):=\phi_x (x,y,p)+\phi_y (x,y,p)p $$ $$
 *
$$\displaystyle (Equation\; 3.13.2)
 * }
 * }

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

\displaystyle f(x,y,p):=\phi_p (x,y,p) $$ $$
 *
$$\displaystyle (Equation\;3.13.3 )
 * }
 * }

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

\displaystyle p:=y' $$
 *

 * }
 * }

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

\displaystyle g_p = \phi_{xp} + \phi_{yp} \cdot p +\phi y $$ for
 *

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

\displaystyle f=\phi_p $$
 *

 * }
 * }

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

\displaystyle g_p = f_x+f_y \cdot p + \phi y $$ $$
 *
$$\displaystyle (Equation\;3.13.4 )
 * }
 * }

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

\displaystyle g_{pp}=f_{xp} + pf_{yp}+f_y+\phi_{yp} $$
 *

 * }
 * }

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

\displaystyle f=\phi_p $$
 *

 * }
 * }

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

\displaystyle g_{pp}=f_{xp}+pf_{yp}+2f_y $$ $$
 *
$$\displaystyle (Equation\;3.13.5 )
 * }
 * }

2.Derive the 1st relation in the 2nd exactness condition
For we know that:
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi_{xy}= \phi_{yx} $$
 *

 * }
 * }

From equation 3.13.4 we can get:
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi_y = g_p-f_x-pf_y $$
 *

 * }
 * }

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

\displaystyle \phi_x = g-\phi_y \cdot p =g- pg_p + pf_x + p^2f_y $$ then
 *

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

\displaystyle \phi_{xy}=g_y-p_yg_p+p_yf_x-pg_{py}+pf_{xy}+2pp_yf_y+p^2f_{yy} $$
 *

 * }
 * }

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

\displaystyle \phi_{yx}=gp_x - pf_{xy}-f_yp_x-f_{xx} $$ apply $$\phi_{xy}=\phi_{yx}$$
 *

 * }
 * }

and $$p_x=p_y=0$$ We get:
 * {| style="width:100%" border="0" align="left"

\displaystyle f_{xx}+2pf_{xy}+p^2f_{yy}=g_{xp}+pg_{yp}-g_y $$ $$
 *
$$\displaystyle (Equation\;3.13.6 )
 * }
 * }

3.Verify that $$x(y')^2+yy'+(xy)y''=0$$satisfies the 2nd exactness condition

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

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

 * }
 * }

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

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

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

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

 * }
 * }

1.Verify the first relation
 * {| style="width:100%" border="0" align="left"

\displaystyle f_{xx}+2pf_{xy}+p^2f_{yy}=0+2p+0=2p $$ $$
 *
$$\displaystyle (Equation\;3.13.7 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle g_{xp}+pg_{yp}-g_y=2p+p-p=2p $$ $$ so Eq7=Eq8, satisfied 2.Verify the second relation
 *
$$\displaystyle (Equation\; 3.13.8)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle f_{xp}+pf_{yp}+2f_y=0+0+2x=2x $$ $$
 *
$$\displaystyle (Equation\;3.13.9 )
 * }
 * }

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

\displaystyle g_{pp}=2x $$ $$
 *
$$\displaystyle (Equation\; 3.13.10)
 * }
 * }

so Eq9=Eq10, satisfied

=R*3.14 Discuss the search for the solution with out making h constant=

Given

 * $$ {h}_{x}+{h}_{y}\cdot P =0$$
$$\displaystyle (1) p. 17-1

$$

Find
$$ h(x,y) $$ with out assuming that h=constant, and discuss the search for the solution

Solution
This problem is assigned in [[media:pea1.f11.mtg18.djvu|Mtg 18 (b)]]

As a starting point I looked at this:

This solution is based on http://en.wikiversity.org/w/index.php?title=User:Egm6321.f10.team03/Hwk3&oldid=621841#Problem_8-_Discuss_the_search_for_h

To find $$ h(x,y)$$ solve equation $$ (1) p. 17-1 $$ for $$\displaystyle {h}_{x}$$ as shown below

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

 * style="width:95%" |
 * $$\displaystyle
 * $$\displaystyle

{h}_{x} = - {h}_{y}P $$ $$
 *
$$\displaystyle (3.14.1)
 * }

Use the 2nd exactness condition, which states

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

 * style="width:95%" |
 * $$\displaystyle
 * $$\displaystyle

{h}_{xy} = {h}_{yx} $$ $$
 *
$$\displaystyle (3.14.2)
 * }

to determine $$ h(x,y)$$. Differentiate both sides of $$\displaystyle (3.14.1)$$ to determine $$ {h}_{xy}$$ using the chain rule (http://en.wikipedia.org/wiki/Chain_rule)

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

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

{h}_{x}= - {h}_{y} \underbrace_{:= {y}^{'}}

\Rightarrow

{h}_{xy} = - {h}_{yy}{y}^{'} - {h}_{y} {y}^{''} $$ $$ Substituting $$ (3.14.3) $$ into $$ (3.14.2)$$ yields:
 *
$$\displaystyle (3.14.3)
 * }

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

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

{h}_{xy} = - {h}_{yy}{y}^{'} - {h}_{y} {y}^{''} \neq {h}_{yx} $$ $$
 *
$$\displaystyle (3.14.4)
 * }

By comparimg $$\displaystyle(3.14.1)$$ to $$\displaystyle(3.14.4)$$, and realizing $$\displaystyle y' = P $$ ,it can be see that the last term must be zero to satify the given equation.

Since $$\displaystyle(3.14.1)$$ is just $$ \displaystyle (1) p. 17-1 $$ rearranged, in order for $$ (1) p. 17-1 $$ to be true, $$\displaystyle {h}_{x} = {h}_{y} = 0$$.

The next step is to integrate both sides to get $$\displaystyle h(x,y) = \rm constant$$. When integrating $$\displaystyle {h}_{x} $$ and $$\displaystyle {h}_{y} $$ it must be considered that in general a function of of integration is also possible.

For reference a similar answer was obtained by Team 6 Fall 2010, for convienience that solution is shown in its entirety with a slight adaptation of equation numbering only for completeness from http://en.wikiversity.org/w/index.php?title=User:EGM6321.f10.team6.cook/hw3&oldid=621925#solution_of_h.28x.2Cy.29

we can get eqn(3.14.6) using definition of $$\begin{align} g(x,y,y') \end{align}$$

where $$\begin{align} P:=y' \end{align}$$

 * without assuming h=const. find the solution of eqn(3.14.6)

We can rewrite the eqn(3.14.5) as (3.14.6)

We are familiar with this equation, as we learned already. Total derivative - Egm6321.f10_HW1_prob#1_team6

As $$\begin{align} \frac{d}{dx}h(x,y)=0 \end{align}$$, we know that $$\begin{align} h(x,y)=f(y) \end{align}$$ only.

It means $$\begin{align} {h}_{x}=0 \end{align}$$

Hence, eqn(3.14.6) becomes,

There are two possible solutions.

1) $$\begin{align} P=y'=0 \end{align}$$

2) $$\begin{align} {h}_{y}=0 \end{align}$$

If 1) were satisfied, whole problems became zero, which is trivial. We can conclude that 2) is the solution.

As $$\begin{align} {h}_{x}=0 \end{align}$$ and $$\begin{align} {h}_{y}=0 \end{align}$$,

Based on the first clarified solution which has been improved for clarity and correctness and the 2nd solution which was copied almost directly, it appears that the search for $$\displaystyle h $$ with out assuming $$\displaystyle h $$ is constant yields the result that $$\displaystyle h $$ is indeed constant to satisfy the exactness conditions.

= R*3.15 Verify whether the equation satifies the 2nd exactness condition =

== Given == Consider the particular form of exact N2-ODE:
 * $$\displaystyle G(x,y,y',y)=g(x,y,p)+f(x,y,p)y=0$$

with
 * $$g(x,y,p)=:\phi_x+\phi_yy'$$

 * $$=\phi_x(x,y,p)+\phi_y(x,y,p)p$$

 * $$f(x,y,p):=\phi_p(x,y,p)$$

The 2nd exactness condition for N2-ODEs are
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle f_{xx}+2pf_{xy}+p^2f_{yy}=g_{xp}+pg_{yp}-g_y$$
 *
$$\displaystyle (Equation\;3.15.1)
 *
$$\displaystyle (Equation\;3.15.1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle f_{xp}+pf_{yp}+2f_y=g_{pp}$$
 *
$$\displaystyle (Equation\;3.15.2)
 *
$$\displaystyle (Equation\;3.15.2)
 * }
 * }

== Find == There is an equation that
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle (15p^4cosx^2)y''+(6xy^2)y'+[-6xp^5sinx^2+2y^3]=0$$
 *
$$\displaystyle (Equation\;3.15.3)
 *
$$\displaystyle (Equation\;3.15.3)
 * }
 * }

Verify whether it satisfies the 2nd exactness condition.

== Solution ==

As for the Equation (3.15.3)

$$\displaystyle f(x,y,p)=15p^4cosx^2=\phi_p(x,y,p)$$

$$\displaystyle g(x,y,p)=\underbrace{(6xy^2)}_{\phi_y(x,y,p)}y'+\underbrace{[-6xp^5sinx^2+2y^3]}_{\phi_x(x,y,p)} $$

And then we got the partial derivative terms:

 * $$\displaystyle f_x=15p^4(-sinx^2)\cdot 2x=-30xp^4sinx^2$$

 * $$\displaystyle f_y=f_{yy}=0$$

 * $$\displaystyle f_{xx}=-30p^4sinx^2-60x^2p^4cosx^2$$

 * $$\displaystyle f_{xy}=0$$

 * $$\displaystyle f_{xp}=-120xp^3sinx^2$$

 * $$\displaystyle g_x=6y^2p-6p^5sinx^2-12x^2p^5cosx^2$$

 * $$\displaystyle g_{xp}=-30p^4sinx^2-60x^2p^4cosx^2+6y^2$$

 * $$\displaystyle g_y=12xyp+6y^2$$

 * $$\displaystyle g_{yp}=12xy$$

 * $$\displaystyle g_p=-30xp^4sinx^2+6xy^2$$

 * $$\displaystyle g_{pp}=-120xp^3sinx^2$$

To verity whether it satisfies the 2nd exactness condition, Substituting them into Equation (3.15.1):

Therefore,

which means it satisfies the condition Equation (3.15.1). Substituting those values into Equation (3.15.2):

Therefore,

which means it satisfies the condition Equation (3.15.2).

= R*3.16 Finish the story =

Given

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

\displaystyle \phi (x,y,p)=3p^5 \cos x^2 +2xy^3 =k $$ $$
 *
$$\displaystyle
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _x = 3p^5(-\sin x^2)(2x)+2y^3 $$ $$
 *
$$\displaystyle
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _y = 6xy^2 $$ $$
 *
$$\displaystyle
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _p = 15p^4 \cos x^2 $$ $$
 *
$$\displaystyle
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle h_yy'+h_x=(6xy^2)y' + 2y^3 $$ $$
 *
$$\displaystyle (Equation\;3.16.0 )
 * }
 * }

Find
$$ \displaystyle \phi (x,y,p) $$ using reverse engineering

Solution

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

\displaystyle \phi (x,y,p)=3p^5 \cos x^2 +2xy^3 =k $$ $$
 *
$$\displaystyle (Equation\; 3.16.1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _x = 3p^5(-\sin x^2)(2x)+2y^3 $$ $$
 *
$$\displaystyle (Equation\;3.16.2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _y = 6xy^2 $$ $$
 *
$$\displaystyle (Equation\; 3.16.3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _p = 15p^4 \cos x^2 $$ $$
 *
$$\displaystyle (Equation\;3.16.4 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle f= \phi _p =15p^4 \cos x^2 $$ $$
 *
$$\displaystyle (Equation\;3.16.5 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle g= \phi_yp+\phi _x = (6xy^2)y'+[-6xp^5 \sin x^2 +2y^3] $$ $$ From equation 6, we get:
 *
$$\displaystyle (Equation\;3.16.6 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi = h(x,y)+3p^5\cos x^2 $$ $$
 *
$$\displaystyle (Equation\;3.16.7 )
 * }
 * }

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

\displaystyle g=(h_y+0)y' + [h_x + 3p^5(-sinx^2)(2x)]=(6xy^2)y' - 6xp^5 \sin x^2 + 2y^3 $$ $$
 *
$$\displaystyle (Equation\; 3.16.8)
 * }
 * }

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

\displaystyle h_yy'+h_x=(6xy^2)y' + 2y^3 $$ $$
 *
$$\displaystyle (Equation\;3.16.9 )
 * }
 * }

We have solved the problem assumed that $$\displaystyle h_x=2y^3$$

Now we assume that $$\displaystyle h_yy'=2y^3$$ so:

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

\displaystyle h_x=(6xy^2)y'=6y^2y' \cdot x $$
 *

 * }
 * }

integrating h:

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

\displaystyle h(x,y)=3x^2 y^2 y' + k_2(y) $$
 *

 * }
 * }

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

\displaystyle h_y=6x^2 y y'+{k_2}'(y) $$
 *

 * }
 * }

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

\displaystyle h_y=\frac{2y^3}{y'} $$
 *

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

\displaystyle {k_2}'(y)=\frac{2y^3}{y'}-6x^2y \cdot y' $$
 *

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

\displaystyle k_2(y)=\frac{y^4}{2y'}-3x^2y'y^2+k_3 $$ so:
 *

 * }
 * }

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

\displaystyle h(x,y)=\frac{y^4}{2y'}+k_3 $$
 *

 * }
 * }

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

\displaystyle \phi (x,y,p)=3p^5\cos x^2 + \frac{y^4}{2y'}=k $$
 *

 * }
 * }

= R*3.17 Derive Equation via RTT =

Given
Component form of gradient/divergence property:

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

$$
 * $$\frac{\partial\rho}{\partial x_i}u_i+\rho\,\frac{\partial u_i}{\partial x_i}=\frac{\partial}{\partial x_i}(\rho u_i)$$
 *
$$\displaystyle (Equation\;3.17.1)
 *
$$\displaystyle (Equation\;3.17.1)
 * }
 * }

Conservation of mass:

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

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

Reynolds Transport Theorem:

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

== Find ==

Show:

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

Solution
Apply $$\displaystyle f(x,t)=\rho(x,t)\,u_i(x,t)$$ to Reynolds Transport Theorem.

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

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

Now apply Equation 3.17.1 to the first term under the integral on the right hand side:

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

Group terms:

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

Via application of Equation 3.17.2 we can eliminate the terms under the parentheses.

$$\frac{D}{Dt}\int_{\beta_t}\rho\mathbf u\,d\beta_t=\int_{\beta_t}\left[\frac{\partial\rho}{\partial t}u_i\right]\,d\beta_t$$

To complete the problem, we can use the definition of material time derivative:

$$\frac {D u_i(x,t)}{Dt}=\left.\frac{d u_i(x,t)}{dt}\right|_{X \rm fixed}=\frac{\partial u_i}{\partial t}$$

= R*3.18 Relate RTT to the 1D Case =

Given
Adjusted Reynold's Transport Theorem:

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

$$
 * $$\frac{D}{Dt}\int_{\beta_t}f(x,t)\,d\beta_t=\int_{\beta_t}\frac{\partial f}{\partial t}\,d\beta_t+\int_{\partial\beta_t}\mathbf n\cdot(f\mathbf u)\,d(\partial\beta_t)$$
 *
$$\displaystyle (Equation\;3.17.3)
 *
$$\displaystyle (Equation\;3.17.3)
 * }
 * }

== Find ==

Obtain the following by means of Equation 3.17.3.

 * $$\frac{d}{dt}\int^{s=b(t)}_{s=a(t)}f(t,s)\,ds=f(t,b(t))\,\frac{db(t)}{dt}-f(t,a(t))\frac{da(t)}{dt}+\int^{s=b(t)}_{s=a(t)}\frac{\partial f(t,s)}{\partial t}ds$$

Solution
Let us choose our function $$\displaystyle f$$ to be a function of $$\displaystyle s$$ and $$\displaystyle t$$, so that $$\displaystyle f=f(t,s)$$. Let $$\displaystyle\mathcal B_t$$ be denoted by the interval between $$\displaystyle s=a(t)$$ and $$\displaystyle s=b(t)$$ so that $$\displaystyle \mathcal B_t \mapsto s$$. This has the following effect on Equation 3.17.3:

$$\frac{D}{Dt}\int^{s=b(t)}_{s=a(t)}f(t,s)\,ds=\int^{s=b(t)}_{s=a(t)}\frac{\partial f(t,s)}{\partial t}\,ds+\int_{\partial s}f(s,t)\mathbf n\cdot\mathbf u\,d(\partial s)$$

Since the left hand side does not depend on $$\displaystyle x$$, the definition of material time derivative simplifies to $$\frac{D}{Dt}=\frac{d}{dt}.$$ Also the velocity of the material point, $$\displaystyle\mathbf u$$, is in the same direction of $$\displaystyle\mathbf n$$, and will be a derivative of $$\displaystyle s$$ rather than $$\displaystyle x.$$

$$\frac{d}{dt}\int^{s=b(t)}_{s=a(t)}f(t,s)\,ds=\int^{s=b(t)}_{s=a(t)}\frac{\partial f(t,s)}{\partial t}\,ds+\int_{\partial s}f(s,t)\frac{\partial s}{\partial t}\,d(\partial s)$$

$$\frac{d}{dt}\int^{s=b(t)}_{s=a(t)}f(t,s)\,ds=\int^{s=b(t)}_{s=a(t)}\frac{\partial f(t,s)}{\partial t}\,ds+\left.\left[f(t,s)\frac{\partial s}{\partial t} \right ]\right|^{s=b(t)}_{s=a(t)}$$

Note we can transform the partial derivatives to regular derivatives since $$\displaystyle s$$ only depends on $$\displaystyle t$$. The next step of evaluating the integration at the bounds completes the proof.

= References =

= Team Work Distribution =

{| cellpadding="10" cellspacing="5" style="width: 95%; background-color: inherit; margin-left: auto; margin-right: auto"
 * style="width: 20%; background-color: wit; border: 1px solid wit; vertical-align: top; -moz-border-radius-topleft: 8px; -moz-border-radius-bottomleft: 8px; -moz-border-radius-topright: 8px; -moz-border-radius-bottomright: 8px;" rowspan="2" |

 * style="width: 80%; background-color: wit; border: 1px solid wit; vertical-align: top; -moz-border-radius-topleft: 8px; -moz-border-radius-bottomleft: 8px; -moz-border-radius-topright: 8px; -moz-border-radius-bottomright: 8px; height: 10px;" |

title: User:Egm6321.f11.team1/report3


text: File:RotationPointLine.jpg

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: File:RotationPointLine.jpg


text:
CAGD/Bézier Curves

Bézier curves are very common in the field of CAGD. They were invented by Dr. Pierre Bézier, an engineer for the Renault automotive company. The goal was to create an intuitive method to allow designers and engineers to create curves. Since construction of curves and shapes from purely mathematical equations can be a daunting task, Bézier curves allow shape generation to be a rather simple task. More information on them can be found on the Wikipedia page.

Definition
A Bézier curve is a parametric curve. It depends on certain control points that often mimic the shape of the resulting curve. In the example at left, they are the labeled points. The shape of the resulting curve is determined by blending functions. Blending functions are functions of the parameter of the curve and depending on their equations, they can change the shape of the curve.

A standard n-degree Bézier curve is defined as follows:
 * $$P(t) = \sum_{i=0}^n B_i^n(t) P_i = \sum_{i=0}^n \left ( \begin{matrix} n \\ i \end{matrix} \right ) (1-t)^{n-i} t^i \mathbf{P}_i$$

The value of each point on the curve depends on the sum of the blending functions multiplied by the control point values. In this equation, the blending functions are denoted B(t). Everything is fairly self-explanatory except the term $$\tbinom{n}{i}$$. This is commonly known as the binomial coefficient. It arises from a binomial expansion and is related to Pascal's triangle. A mathematical definition for this term is:
 * $$\left ( \begin{matrix} n \\ i \end{matrix} \right ) = \frac{n!}{i!(n-i)!}$$

This definition isn't very helpful in computing algorithms because of the recursive nature of the factorial. The recurrence relationship solves this problem:
 * $$\left ( \begin{matrix} n \\ i \end{matrix} \right ) = \frac{n+1-i}{i} \left ( \begin{matrix} n \\ i-1 \end{matrix} \right ) $$

Since we know that the binomial coefficient is 1 when i=0, we can just multiply the fractional term with every iteration of i. In a CAD system with multiple Bézier curves, this cuts down computation time significantly. For the standard Bézier curve, the domain for the parameter t is [0,1].

Relationship to Bernstein polynomials
A Bézier curve can be written as a set of n Bernstein polynomials, where n is the dimension of the Bézier curve. A Bernstein polynomial B(t) has the standard form:
 * $$B(t) = \sum_{i=0}^n \tbinom{n}{i} b_i (1-t)^{n-i} t^i = \left \langle b_0, b_1, \cdots, b_n \right \rangle$$

A 3D Bézier curve P(t) can be expressed thus:
 * $$P(t) = \left ( X(t), Y(t), Z(t) \right ) = \left ( \left \langle x_0, x_1, \cdots, x_n \right \rangle , \left \langle y_0, y_1, \cdots , y_n \right \rangle , \left \langle z_0, z_1, \cdots , z_n \right \rangle \right )$$

Arbitrary Parameter Intervals
The domain for a standard parameter t is [0,1]. However, Bézier curves can be defined for any range of parameters. The conditions of the interval should be such that:
 * $$\mathbf{P}_{[t_0,t_1]}(t) = \frac{\sum_{i=0}^n \tbinom{n}{i} (t_1 - t)^{n-i} (t-t_0)^i \mathbf{P}_i}{(t_1 - t_0)^n} = \sum_{i=0}^n \binom{n}{i} \left ( \frac{t_1 - t}{t_1 - t_0} \right )^{n-i} \left ( \frac{t - t_0}{t_1 - t_0} \right )^i \mathbf{P}_i $$

The de Casteljau Algorithm
The de Casteljau algorithm is a way to subdivide a Bézier curve into 2 separate curves. It was developed by Paul de Casteljau, an engineer who worked for the Citroën automobile company. If a curve has a parameter interval from $$[t_0,t_2]$$, then the algorithm would yield 2 curves with a common parameter $$t_1 \in [t_0,t_2]$$ so that one curve has an interval from $$[t_0,t_1]$$ and the other has one from $$[t_1,t_2].$$

In order to facilitate the algorithm, we define the control points with a superscript, $$P_i^j.$$ The original control points correspond to j=0. The algorithm is defined as follows:
 * $$P_i^j = (1 - \tau) P_i^{j-1} + \tau P_{i+1}^{j-1}, j = 0,...,n, i = 0,...,n-j$$,

where j is the iteration of the computation. We will construct a computation table where j is the iteration of the computation. The computation table in general will look like this: $$ \begin{matrix} P_0^0 & P_1^0 & P_2^0 & \cdots & P_n^0 \\ P_0^1 & P_1^1 & \cdots & P_{n-1}^1 \\ P_0^2 & \cdots & P_{n-2}^2 \\ \vdots \\ P_0^n \\ \end{matrix} $$ We now have the control points for the respective curves. One curve contains the control points $$P_0^0, P_0^1, P_0^2, \cdots, P_0^n$$, which are the points in the leftmost column, and the other curve contains the control points $$P_n^0, P_{n-1}^1, P_{n-2}^2, \cdots , P_0^n \,$$, which are the points on the diagonal of the table above. The de Casteljau algorithm has T(n) =O(n2) time complexity. It is very numerically stable, however.

Degree Elevation of Bézier Curves
It can be shown that any n-degree Bézier curve can be expressed by another Bézier curve of degree n+1. There are two main identities that we must have in order to show this: These identities can be derived from the Bézier curve definition. The proof starts by multiplying the Bézier curve by [(1-t)+t]:
 * 1) $$(1-t)B_i^n(t) = \frac{n+1-i}{n+1}B_i^{n+1}(t)$$
 * 2) $$tB_i^n(t) = \frac{i+1}{n+1}B_{i+1}^{n+1}(t)$$

\begin{align} \mathbf{P}(t) & = [(1-t)+t]\mathbf{P}(t) \\ & = [(1-t)+t]\sum_{i=0}^n \mathbf{P}_i B_i^n(t) \\ & = \sum_{i=0}^n \mathbf{P}_i [(1-t) B_i^n(t) + t B_i^n(t)] \\ & = \sum_{i=0}^n \mathbf{P}_i \left [ \frac{n+1-i}{n+1}B_i^{n+1}(t) + \frac{i+1}{n+1}B_{i+1}^{n+1}(t) \right ] \\ & = \sum_{i=0}^n \frac{n+1-i}{n+1} \mathbf{P}_i B_i^{n+1}(t) + \sum_{i=0}^n \frac{i+1}{n+1} \mathbf{P}_i B_{i+1}^{n+1}(t) \\ & = \sum_{i=0}^n \frac{n+1-i}{n+1} \mathbf{P}_i B_i^{n+1}(t) + \sum_{i=1}^{n+1} \frac{i}{n+1} \mathbf{P}_{i-1} B_{i}^{n+1}(t) \\ & = \sum_{i=0}^{n+1} \frac{n+1-i}{n+1} \mathbf{P}_i B_i^{n+1}(t) + \sum_{i=0}^{n+1} \frac{i}{n+1} \mathbf{P}_{i-1} B_{i}^{n+1}(t) \\ & = \sum_{i=0}^{n+1} \left [ \frac{(n+1-i) \mathbf{P}_i + i \mathbf{P}_{i-1}}{n+1} \right ] B_{i}^{n+1}(t) \\ & = \sum_{i=0}^{n+1} \mathbf{P}_i^* B_{i}^{n+1}(t) \\ \end{align} $$ Thus we have the following relationship between the control points:

\mathbf{P}_i^* = \alpha_i \mathbf{P}_{i-1} + (1-\alpha_i) \mathbf{P}_i, \, \alpha_i = \frac{i}{n+1} $$ If the degree elevation is performed repeatedly so that the degree of the curve approaches infinity, the control polygon converges to the curve itself.

Derivatives of Bézier Curves
Bézier curves with degree n have parametric derivatives that can be expressed as Bézier curves of degree n-1. If a Bézier curve has an arbitrary interval [t0,t1], then the control points of the derivative can be expressed as:
 * $$\mathbf{P}_i^\prime = \frac{n}{t_1-t_0} (\mathbf{P}_{i+1} - \mathbf{P}_i)$$

A generalization of the derivative equation is:
 * $$\mathbf{P}_i^{(m)} = \frac{n!}{(n-m)!(t_1-t_0)^m} \sum_{k=0}^n (-1)^{k+m} \binom{m}{k} \mathbf{P}_{i+k}$$

The curve of the first derivative of a standard Bézier curve is known as a hodograph. If the curve passes through the origin of the hodograph, it corresponds to a cusp on the original curve. This notion of a derivative doesn't extend to rational Bézier curves. It only applies to standard ones. Rational Bézier curves have derivatives that involve the quotient rule, so this formula doesn't apply. Consequently, rational Bézier curves of degree n have derivatives that can be expressed as a rational Bézier curve of degree 2n.

3D Bézier Curves
Bézier curves can be defined in three dimensions. The de Casteljau algorithm, degree elevation, and hodographs extend into 3D space. This will prove very useful when discussing rational Bézier curves.

Rational Bézier Curves
Sometimes we want more control and versatility in our Bézier curves. We can assign a scalar weight to each control point in order to make the curve more versatile. If we divide by the sum of the scalar weights and blending functions, we get a rational Bézier curve:
 * $$\mathbf{P}(t) = \frac{\sum_{i=0}^n w_i B_i^n (t) \mathbf{P}_i}{\sum_{i=0}^n w_i B_i^n (t)} $$

The blending functions are rational polynomials, or the ratio of two polynomials. If the weights of the control points are all 1, the rational Bézier reduces to a standard polynomial Bézier curve. Rational Bézier curves are useful for lots of reasons. A degree 2 polynomial Bézier curve can only represent a parabola. An exact representation of a circle requires a degree 2 rational Bézier curve. As well, a perspective drawing of a polynomial 3D Bézier curve is a rational Bézier curve. If we define a point in 3D space as $$(x_i w_i,y_i w_i, w_i)$$, we get a kind of cone where the point of the cone is at the origin and the base is the 3D curve. This would contain all the lines that extend from the point of the cone to a point on the curve. Each point in 3D space $$(X,Y,Z)$$ maps to a corresponding point in 2D space $$\left ( \frac{X}{Z}, \frac{Y}{Z} \right )$$. Thus, the point $$(x_i w_i,y_i w_i, w_i)$$ corresponds to a 2D point $$(x_i,y_i)$$ on the z=1 plane. This cone paradigm helps us when we try to implement the de Casteljau or degree elevation algorithms on rational Bézier curves. In order to use these algorithms, we first need to convert the 2D rational Bézier to a 3D polynomial curve. Then, implement the algorithm. Afterward, convert the result back into a 2D rational curve. Again, derivatives can't be implemented like above. To calculate the derivative, the rational Bézier curve needs to be split into its respective coordinates:

\begin{align} x(t) & = \frac{x_n(t)}{d(t)} = \frac{w_0 x_0 \binom{n}{0} (1-t)^n + w_1 x_1 \binom{n}{1} (1-t)^{n-1} t + \cdots}{w_0 \binom{n}{0} (1-t)^n + w_1 \binom{n}{1} (1-t)^{n-1} t + \cdots} \\ y(t) & = \frac{y_n(t)}{d(t)} = \frac{w_0 y_0 \binom{n}{0} (1-t)^n + w_1 y_1 \binom{n}{1} (1-t)^{n-1} t + \cdots}{w_0 \binom{n}{0} (1-t)^n + w_1 \binom{n}{1} (1-t)^{n-1} t + \cdots} \end{align} $$ From calculus, we can implement the quotient rule:
 * $$\dot{x}(0) = \frac{d(0) \dot{x_n}(0) - \dot{d}(0) x_n(0)}{d^2(0)}, \, \dot{y}(0) = \frac{d(0) \dot{y_n}(0) - \dot{d}(0) y_n(0)}{d^2(0)}$$

The math gets simpler by only evaluating the derivative at the endpoints. Thus, we get the following relationships for a Bézier curve over any arbitrary interval $$\mathbf{P}_{[t_0,t_1]}(t)$$:

\begin{align} \mathbf{P}'(0) & = \frac{w_1}{w_0} \frac{n}{t_1-t_0} (\mathbf{P}_1 - \mathbf{P}_0)\\ \mathbf{P}''(0) & = \frac{n(n-1)}{(t_1 - t_0)^2} \frac{w_2}{w_0} (\mathbf{P}_2 - \mathbf{P}_0) - \frac{2n}{(t_1 - t_0)^2} \frac{w_1}{w_0} \frac{nw_1 - w_0}{w_0} (\mathbf{P}_1 - \mathbf{P}_0) \\ \end{align} $$

Curvature of a Bézier Curve
Curvature for a curve at a certain point is defined as the reciprocal of the radius of the osculating circle. In the figure at left, the osculating circle is marked in blue for curve C at point P. At P, the tangent lines for the curve and the circle are equal. The radius of the osculating circle is called the radius of curvature. The curvature is then the reciprocal of that radius. A straight line has a curvature of zero, but has an infinite radius of curvature.

A parametric curve has a fairly complex equation for curvature:
 * $$\kappa = \frac{\left\vert \dot{x} \ddot{y} - \dot{y} \ddot{x} \right\vert{}}{\left ( \dot{x}^2 + \dot{y}^2 \right )^{3/2}}$$

This equation simplifies dramatically when evaluated at the endpoint of a Bézier curve:
 * $$\kappa(t_0) = \frac{w_0 w_2}{w_1^2} \frac{n-1}{n} \frac{d}{c^2}$$

In this equation, c is simply the distance between the endpoint and the second control point (P0 and P1) and d is the perpendicular distance from the third control point (P2) and the line formed by the first and second control points. Since Bézier curves are symmetrical, this can be used at either endpoint of the curve. It is very common to want to know the curvature at point between the endpoints. This formula doesn't seem that useful, despite its elegance. However, a very clever trick can be employed to use this equation. Any Bézier curve can be split into two curves at the desired point using the de Casteljau algorithm and this formula can be employed at the endpoint of either of the resulting curves.

Continuity of Bézier Curves
Continuity refers to the smoothness of the derivatives of a curve. There are really two different types of continuity that are important in CAGD: parametric and geometric. The symbols we use to represent nth order continuity are Cn or Gn, respectively. In general, curves that are Gn can be reparameterized so that the curves are Cn. In addition, curves that are Cn are also Gn if the equations for Cn hold and if the first n derivatives of either curve are not zero.

Parametric Continuity
Parametric continuity between two curves constrains not only the magnitude of the derivative, but also the parameter values for each curve. Two curves P[t 0, t1] and Q[t 1, t2] have nth order parametric continuity (are Cn) if:

\begin{align} \mathbf{P}(t_1) & = \mathbf{Q}(t_1) \\ \mathbf{P}'(t_1) & = \mathbf{Q}'(t_1) \\ \mathbf{P}(t_1) & = \mathbf{Q}(t_1) \\ \vdots\\ \mathbf{P}^{(n)}(t_1) & = \mathbf{Q}^{(n)}(t_1) \\ \end{align}$$ In the case above, t1 is the point where P and Q are joined. C0 then means only that the endpoints are coincident. C1 means that the endpoints are coincident and that the tangent of both curves has the same magnitude and direction at the same parameter value. C2 means that the curves are C1 and C0 as well as the curvature having the same magnitude and direction for both curves.

Geometric Continuity
Geometric continuity can be viewed as a less strict way of constraining two curves. Geometric continuity is also known as visual continuity. Unlike with parametric continuity, the values of the derivatives aren't bound to specific parameter values. This means that two curves that are G0 are coincident, but they do not need to have the same parameter value at that point, that is, P(1) doesn't need to equal Q(1). Further, two curves that are G1 are G0 and in addition must have a common tangent line, but the magnitudes of the tangent vectors don't have to be the same. Curves that are G2 are G0 and G1 and have the same center of curvature at the point that they are joined.

Reparameterization of Bézier Curves
A reparameterization of a curve is simply changing the values of the curve to correspond to a different parameter value. For any parametric curve Q(t), we can substitute another parameter s in for the parameter t that has a relationship to t (for example, s = 2t + 3). This would yield a new curve R(s). If the domains for the curves are infinite, the new curve would be geometrically identical since they are made up of the same points. Thus, we can say that Q(t) = R(s). We have changed the parameterization of the curve without changing any of the control points. Just as we would expect with any new parameterization, Q(0.5) is not equal to R(0.5). If we have intervals on our curves, as in Bézier curves, then a simple reparameterization technique would be just to make an equation relating a new parameter to the old one, as in the above example. For the curve P[t 0,t1] (t) and the reparameterized curve Q[s 0,s1] (s), they would have the same degree, the same control points and the same weights, however, the interval for Q(s) would not be the same as for P(t), or in other words, t0 ≠ s0 and t1 ≠ s1. If the new interval is known, then the reparametrization can be expressed as $$t = \frac{t_0 s_1 - s_0 t_1}{s_1 - s_0} + \frac{t_1 - t_0}{s_1 - s_0} s$$. A rational Bézier curve can be reparameterized by using a similar substitution: $$t = \frac{f(u)}{g(u)}$$. Because of this special substitution, it's possible to reparameterize the curve without changing the endpoints of the curve segment, or in other words, not changing the interval. This special substitution takes the form $$t = \frac{a(1-u) + bu}{c(1-u) + du}$$, where u is the new parameter and the variables a,b,c,d are simply constants we must determine. For most cases, 0 ≤ t ≤ 1, so we would want 0 ≤ u ≤ 1 as well. If t = 0 when u = 0, then a = 0. If t = 1 when u = 1, then c = 1 and d = b. This yields the new substitutions:
 * $$t = \frac{bu}{(1-u) + bu}, (1-t) = \frac{(1-u)}{(1-u) + bu}$$

A general rational Bézier curve is described with the following equation:
 * $$\mathbf{P}(t) = \frac{\binom{n}{0} w_0 \mathbf{P}_0 (1-t)^n + \binom{n}{1} w_1 \mathbf{P}_1 (1-t)^{n-1} t + \cdots + \binom{n}{n} w_n \mathbf{P}_n t^n}{\binom{n}{0} w_0 (1-t)^n + \binom{n}{1} w_1 (1-t)^{n-1} t + \cdots + \binom{n}{n} w_n t^n}$$

Using our substitutions and multiplying numerator and denominator by $$((1-u) + bu)^n$$ and simplifying, we get the following:
 * $$\mathbf{P}(t) = \frac{\binom{n}{0} (b^0 w_0) \mathbf{P}_0 (1-t)^n + \binom{n}{1} (b^1 w_1) \mathbf{P}_1 (1-t)^{n-1} t + \cdots + \binom{n}{n} (b^n w_n) \mathbf{P}_n t^n}{\binom{n}{0} (b^0 w_0) (1-t)^n + \binom{n}{1} (b^1 w_1) (1-t)^{n-1} t + \cdots + \binom{n}{n} (b^n w_n) t^n}$$

This proves that we can reparameterize a rational Bézier curve by simply multiplying the weights by bi, something very simple. The constant b can be chosen to be anything, since there are no restrictions placed on it from the parametrization. This kind of reparameterization is often useful in graphics, because a rational Bézier curve will look smoother if its weight ratio is minimized. The weight ratio is the ratio of the largest weight of the curve to the smallest weight. For example, a curve with weights 8,2,3,1 (weight ratio = 8) won't look as smooth as the curve 2,1,3,2 (weight ratio = 2).

Explicit Bézier Curves
A special case of parametric curves is when we define the parameterization x=t. This is called an explicit Bézier curve. For polynomial Bézier curves, when this parametrization is defined, the x-coordinates of the control points are evenly spaced over the interval where the curve is defined. The curve is really just a Bernstein polynomial. There are many advantages to explicit Bézier curves and we will discuss them when these advantages arise.

title: CAGD/Bézier Curves


text:
CAGD/B-splines

Because some curves are too complex to express as a single Bézier curve, a new type of curve is needed. Splines can serve that purpose.

Definition
Historically, shipbuilders would use flexible strips of wood called "splines" placed between metal weights called "ducks". Generally, the curves that were created in this manner were infinitely continuous except at the ducks, where the splines were generally only C0 with each other. B-spline curves, or basis spline curves, are shapes that consists of several Bézier curves. The best way to think of a spline is a machine that generates Bézier curves. An n-degree B-spline curve produces n-degree Bézier curves that are automatically Cn-1 with each other. The advantage to B-splines is that we can represent m Bézier curves of degree n with m+n B-spline control points, far less than the nm+1 control points that a string of Bézier curves requires. The following explanation of B-splines is not a "traditional" explanation. B-splines contain a lot of intense mathematics and most of the algorithms aren't intuitive. This explanation will attempt to show the mechanism behind B-splines. From here, an explanation of the recurrence relations and mathematics that can be found other places on the Web will make more sense. This will not be a cursory explanation; even though this tutorial will be simple to understand, the techniques shown here are powerful and can be implemented computationally if desired.

Polar Form of B-spline Points
Dr. Lyle Ramshaw introduced a powerful notation for B-spline control points: the polar form. It is a powerful tool that allows B-splines to be described simply. There are 4 rules for the polar labels (the labels for the control points): \begin{cases} u_j = a, j \leq n-i \\ u_j = b, \text{otherwise}\\ \end{cases} $$
 * 1) For an n-degree Bézier curve P[a,b](t), we must label each control point with a polar label. The new label for the point $$P_i = P(u_1,u_2,\cdots,u_n)$$, where:
 * Thus, for a degree-3 Bézier curve, the polar labels become P0 = P(a,a,a), P1 = P(a,a,b), P2 = P(a,b,b), P3 = P(b,b,b).
 * 1) A B-spline with a knot vector $$[t_1,t_2,t_3,\cdots]$$ has polar labels that follow the relation$$P_i = P(t_i,t_{i+1},\cdots,t_{i+n-1})$$.
 * For a knot vector [0,1,2,3,4,5] of a degree 3 B-spline, then P0 = P(0,1,2), P1= (1,2,3), P2= (2,3,4), P3= (3,4,5).
 * 1) The arguments of a polar label are symmetric. It means that they can be changed in any order and still maintain the description of the point.
 * Example: P(0,2,5,4) = P(4,2,0,5) = P(2,4,5,0), etc.
 * 1) Polar labels with only one different argument lie on the same line.
 * In the example at the right, the polar labels only differ by 1 number. A point can be found by interpolating the line, just as the polar label f(6,a,b,c) can be found by interpolating between the points labeled f(2,a,b,c) and f(9,a,b,c). The point is located 3/7 of the distance from f(2,a,b,c) and f(9,a,b,c). The general equation is given for f(u1,u2,...,un-1,a), f(u1,u2,...,u_n-1,b), f(u1,u2,...,un-1,c):
 * $$f(u_1,u_2,\cdots,u_{n-1},c) = \frac{(b-c) f(u_1,u_2,\cdots,u_{n-1},a) + (c-a) f(u_1,u_2,\cdots,u_{n-1},b)}{b-a}$$
 * As you can see, it's the same formula as for the affine transformation of a line.

The Knot Vector
The knot vector is simply a collection of parameter values for the individual Bézier curves that make up a B-spline. For example, if we have a cubic B-spline and want to spline together a series of Bézier curves with intervals of [2,3], [3,5], [5,6], and [6,9], the knot vector would be $$[t_0, t_1, 2, 3, 5, 6, 9, t_7, t_8]$$. The knots in the vector must be arranged in an ascending order. There can be repeated knots values, for example, the knot vector [0,1,2,3,3,3,4,5,5,6] is perfectly valid. Repeated knots do affect the curve, however. You might have noticed the other knots appended to the knot vector. There are always n-1 knots appended to the front and back of the knot vector. These knots specify the end conditions of the B-spline. For example, if t0 = t1 = 2, then the endpoint of the B-spline with parameter values [2,3] will pass through the endpoint of the B-spline. This will also be the case at the other endpoint if 9 = t7 = t8. Most representations of the knot vector require n end condition knots. This is mainly just a historical convention. In the above example, if we added knots to either end to make 3 end condition knots since n = 3 (i.e. $$[k, t_0, t_1, 2, 3, 5, 6, 9, t_7, t_8, m]$$), they wouldn't affect the curve at all. It does appear a lot in other B-spline discussions, so I make it point to mention it here. Sometimes we talk about the spacing of a knot vector, or the difference between successive knot values. If a knot vector is evenly spaced, like [0,1,2,3,4,5,6], then we call it a uniform B-spline. If the knot vector is unevenly spaced, then we call it a non-uniform B-spline.

Generation of Bézier Curves
If the B-splines are just a way to generate Bézier curves, where are the Bézier curves? Well, we have B-spline control points, but we need a way to get the Bézier control points. This is where the polar labels come in. We have to establish the rules for assigning polar labels to B-spline control points. For a degree-n curve, we take the first n knots in the knot vector and load them into the polar label for the first control point. For the second control point, we take n knots again, but we take the 2nd knot to the (n+1)th knot. We repeat this process until we go through the whole knot vector. For example, if we have a cubic B-spline with a knot vector [0,0,0,1,3,5,7,7,7], we get the following labels for the B-spline:

\begin{align} B_0: & f(0,0,0) \\ B_1: & f(0,0,1) \\ B_2: & f(0,1,3) \\ B_3: & f(1,3,5) \\ B_4: & f(3,5,7) \\ B_5: & f(5,7,7) \\ B_6: & f(7,7,7) \end{align}$$ The picture at right shows the Bézier curves that the B-spline curve generated. If we remember how polar labels describe Bézier curves, a degree 3 Bézier curve with an interval from [a,b] has polar labels f(a,a,a), f(a,a,b), f(a,b,b), f(b,b,b). In the pictured example, we know the 1st Bézier curve has parameter values from [0,1]. To fully describe this curve, we would need points with polar labels f(0,0,0), f(0,0,1), f(0,1,1), f(1,1,1). As we can see, the curve has the first 2 polar labels, but not f(0,1,1) and f(1,1,1). How do we get them? We can use the 4th rule of polar labels. We know that f(0,1,1) is 1/2 the distance from f(0,0,1) and f(0,1,2), so we can label a point there. We can find f(1,1,2) by the same method. Then, we can see that f(1,1,1) is halfway between f(0,1,1) and f(1,1,2). Now we have all the control points that describe the Bézier curve. It's that simple. We can use this technique to generate the Bézier curves from any B-spline.

Knot Vector Insertion
In a sense, we've already covered knot insertion. Knot insertion is when a value is inserted into the knot vector. So what happens when we insert a knot? Let's start with a simple degree-3 B-spline, [0,0,0,1,2,2,2]. The polar labels for this curve are f(0,0,0), f(0,0,1), f(0,1,2), f(1,2,2), and f(2,2,2). If we inserted a 1 in the knot vector, the vector would become [0,0,0,1,1,2,2,2]. This would change the polar labels that describe the points for the curve:

\begin{align} f(0,0,0) \\ f(0,0,1) \\ f(0,1,2) \\ f(1,2,2) \\ f(2,2,2) \\ \end{align} \Rightarrow \begin{align} f(0,0,0) \\ f(0,0,1) \\ f(0,1,1) \\ f(1,1,2) \\ f(1,2,2) \\ f(2,2,2) \\ \end{align} $$ Inserting another 1 in the knot vector would just give us the point f(1,1,1). The knot vector in this case would be [0,0,0,1,1,1,2,2,2]. We can see that we get the control points for all the Bézier curves that describe the B-spline. When we were generating the Bézier curves in the section above, we were interpolating the points. In that example, we had the points f(0,0,0) and f(0,0,1) and we were solving for the points f(0,1,1) and f(1,1,1). We would have gotten the same results we calculated for if the knot vector had been [0,0,0,1,1,1,2,3,4,5,6,7,8,8,8]. So we know that by inserting repeated knots, we can get the control points for the constituent Bézier curves. In this example, we saw that we "traded" the point f(0,1,2) for the two points f(0,1,1) and f(1,1,2) by inserting the 1 into the knot vector. So what happens if the knot value we insert is not a repeat? For the vector [0,0,0,1,3,3,3], inserting a 2 would change the polar labels like so:

\begin{align} f(0,0,0) \\ f(0,0,1) \\ f(0,1,3) \\ f(1,3,3) \\ f(3,3,3) \\ \end{align} \Rightarrow \begin{align} f(0,0,0) \\ f(0,0,1) \\ f(0,1,2) \\ f(1,2,3) \\ f(2,3,3) \\ f(3,3,3) \\ \end{align} $$ Here, we simply "traded" the 2 points f(0,1,3) and f(1,3,3) for the 3 points f(0,1,2), f(1,2,3), and f(2,3,3). Repeating knot insertion on a degree-n B-spline until there are n repeated knots is a technique to evaluate the B-spline at any parameter value. This is called the the de Boor algorithm. De Boor's algorithm is analogous to de Casteljau's algorithm for Bézier curves; in fact, it's a generalization of de Casteljau's algorithm.

Multiple Knots
If the same knot value appears in the knot vector more than once, we call it a multiple knot. We can say at that point, there is a degenerate Bézier curve that has parameter values from [t,t], where t is the repeated knot value. Now let's talk about continuity. In general, a degree-n B-spline automatically generates Bézier curves that are Cn-1 continuous. We can see that the degree-3 B-spline in the pictured example has Bézier curves that look C2. However, this is only the case only when there are no multiple knots. We know the curves in the example are C2 because no knot value is repeated. However, if the knot vector was [0,0,0,1,1,2,3,4,5,6,7,8,8,8], then the continuity is no longer C2 between every curve. At t=1, the Bézier curves would be only C1 at that point because of the repeated knot. Remember that at t=0 and t=8, we have end conditions. It could be said that because we have a triple knot at the ends, the ends of the B-spline are only C0.

Periodic B-splines
A special case of the B-spline is a periodic B-spline. This is simply a B-spline that ends where it begins, making a closed loop. In the image at right, each of the Bézier curves that is generated by the B-spline is colored. But how was this curve generated? There are only 2 constraints on a B-spline curve that must be met in order to turn it into a periodic B-spline. As shown, the knot vector has 10 knots in it. A cubic B-spline curve with 10 knots must have 8 control points, but where are the other three? The first 3 control points of the curve are also the last three control points. This is shown with the polar labels. In addition to control points, the knot vector must be set a certain way. If you take a look at the control points with 2 polar labels, you might notice a pattern with them. At those points, the first polar label and the second polar label have the same knot intervals, that is, they are spaced the same distance apart. For example, the topmost point has polar labels (1,2,4) and (21,22,24). The spacing between these values are 1 and 2, respectively. You might also notice this pattern with the other doubled control points. Although in this example the doubled polar labels are exactly 20 away from each other, this doesn't have to happen. The only thing that matters are the spacing (intervals) between the knots of the polar labels. This can be summed up as follows: For a degree-n B-spline curve to be periodic: As you can see in this case, the knot values themselves aren't necessarily relevant. The knot vector doesn't have to start at 1; it could start at 21, 51 or even 157. All that really matters are the knot intervals. A "regular" B-spline curve can also be described in terms of knot intervals, but it's more intuitive to describe periodic B-splines in terms of knot intervals. It also helps in performing knot insertion.
 * 1) The first n control points and the last n control points must be the same.
 * 2) The first n+1 knot intervals and the last n+1 knot intervals of the knot vector must be the same.

Knot Intervals and Insertion for Periodic B-splines
The cubic B-spline curve at the right is the same as the curve above and is now described in terms of knot intervals. If you remember, the curve has 10 knots in the knot vector. Discarding the n-1 knots on either end of the vector yields the 6 parameter values over which the B-spline curve is defined. 5 Bézier curves will span these parameter values, which just happens to be the number of sides on the control polygon. We can assign each side of the control polygon to a Bézier curve and the parameter interval over which the Bézier curve is defined. In the figure at right, the colors show which side corresponds to which curve. Let's talk about knot intervals a bit first before we talk about knot insertion. Let's look at what the intervals tell us about the knot vector. If the interval for a curve is 1, the parameter values could go from [0,1], [2,3], or even [156,157]. It doesn't really matter what the values of the knot vectors are, since we know that only the intervals matter. In this way, we can arbitrarily construct a knot vector starting at any value. If we started at 0 and at the topmost control point, then the knot vector would be 2, 4, 5, 18, and 19, if we proceed in a clockwise manner. We must also take into account the end condition knots at either end of the vector. This is just another way of thinking about a B-spline curve. The intervals can be any number, including 0. What happens at a 0 interval? Well, if we had a 0, then that corresponds to a repeated knot. Hopefully, you are now thinking about the de Boor algorithm and wondering how we can get the Bézier curves that a periodic B-spline curve would generate.

title: CAGD/B-splines


text:
User:Dkromer1996/enes100/poppit

New Page

title: User:Dkromer1996/enes100/poppit


title: User:Dkromer1996/enes100


text:
User:Dkromer1996/enes100/Flyers

Flyers

title: User:Dkromer1996/enes100/Flyers


text:
User:Baminnick/enes100/cupcakes/MakerBot Procedure

Purpose
The purpose of this MakerBot Cupcake CNC procedure is to assist future HCC engineering students with the 3D-Scan project. By completing this procedure, a future team working with the MakerBot will not only understand how to operate it quickly, but also advance to the next step in the project.

Setup

 * 1. Log on to a computer near the MakerBot Cupcake CNC. Setup Procedure Step 1.jpg
 * 2. Open the “Engineering” folder on the desktop. Setup Procedure Step 2.jpg
 * 3. Click on the program called, “ReplicatorG.” SetUp Procedure Step 3.jpg
 * 4. Plugin the power cord to the MakerBot and an outlet.
 * 5. Plugin the serial cord to the MakerBot and the computer you are currently working on.
 * 6. Turn on the MakerBot Cupcake CNC, the power switch is on the bottom left of the back side.
 * For more assistance, view this video: Setting Up the MakerBot Cupcake CNC
 * 7. Using the connect tool in the top Replicator G menu, connect ReplicatorG to the MakerBot. If the connection is not recognized in ReplicatorG you may need to select a different serial port or rescan for other serial ports. This can be done by going to the “Machine” drop down menu on the tool bar in ReplicatorG. Setup Procedure Step 7.1.jpg Setup Procedure Step 7.2.jpg
 * 8. “Machine HCC Makerbot ready” should appear in green at the top of the ReplicatorG screen. And more of the tools at the top of the ReplicatorG screen are available to use. Setup Procedure Step 8.jpg
 * 9. Place the black wire into the MakerBot Cupcake CNC motor. The motor is located in the center of the top side of the MakerBot. Setup Procedure Step 9.jpg
 * 10. Tighten the screw. The screw is located on the right side of the motor. Setup Procedure Step 10.jpg
 * 11. The setup of the MakerBot Cupcake CNC is now complete.

Downloading an STL file

 * 1. Load Google Chrome or Mozilla Firefox.
 * 2. Go to www.thingiverse.com
 * 3. Search something to print using the search bar in the upper right-hand corner. Downloading an STL File Procedure Step 3.jpg
 * 4. In the search results list, click on the link that pertains to the object you wish to print. Do not click on a link that is the image of something.
 * 5. On the object’s page, confirm this is what you want to print by referring to the images on the left.
 * 6. Near the bottom of the page find an STL file to download. NOTE: There may not be any file to download if the STL file for that object has not yet been developed.
 * 7. Click the red download arrow adjacent to the STL file you want to print. Downloading an STL File Procedure Step 7.jpg
 * 8. Refer back to the desktop to confirm the file was downloaded.
 * 9. If the STL file is present, you have successfully downloaded the file, and are ready to print.

Uploading an STL file onto ReplicatorG

 * 1. In ReplicatorG, go to the File drop down menu in the toolbar, select “Open.” Uploading an STL File onto Replicator G Procedure Step 1.jpg
 * 2. In the “Open” window, go to “Desktop” and open the STL file you want to print.
 * 3. The picture of the file should appear on ReplicatorG. To view the model of the object, use the “View”, “Move”, and “Rotate” commands located on the right side of the ReplicatorG window. Uploading an STL File onto Replicator G Procedure Step 3.jpg
 * 4. Scale the model to the size you desire, but make certain the size is consistent with the tolerances of the MakerBot Cupcake CNC. NOTE: MakerBot Cupcake CNC will print up to any size below 10mm x 10mm x 15mm. Uploading an STL File onto Replicator G Procedure Step 4.jpg
 * 5. Click “Generate GCode.” Uploading an STL File onto Replicator G Procedure Step 5.jpg
 * 6. If you made any changes to your model, a "Save model?" window will appear. Click yes if this is the appropriate scale of the model you want to print.

 * 7. In the GCode Generator window, select SF35-cupcake-HBP as a Skeinforge profile. Uploading an STL File onto Replicator G Procedure Step 7.jpg
 * 8. Select or unselect the “Use raft” check box if you want to create a raft. Uploading an STL File onto Replicator G Procedure Step 8.jpg
 * 9. Click Generate GCode at the bottom of the GCode Generator window. Uploading an STL File onto Replicator G Procedure Step 9.1.jpg Uploading an STL File onto Replicator G Procedure Step 9.2.jpg
 * 10. You are now ready to print.

Printing

 * 1. Click on the control panel tool in the ReplicatorG tool bar. Printing Procedure Step 1.jpg
 * 2. In the “Control Panel” window, set the “Target Temperature (C)” to 220.0. This heats the wire to its appropriate melting temperature. This could take a few minutes. Printing Procedure Step 2.jpg
 * 3. Moving the X, Y, and Z jog controls of the Homing feature in the Control Panel Window, center the motor over the work table. Printing Procedure Step 3.1.jpg For more assistance you can view a video using this link:Centering the Work Table under the MakerBot Motor
 * 4. Now wait for the motor’s current temperature to reach the target temperature. Printing Procedure Step 4.jpg
 * 5. Once the motor is centered and heated, click the “Build” tool in the ReplicatorG toolbar. Printing Procedure Step 5.jpg
 * 6. A message will appear stating that the MakerBot will do a test extrusion and the material from the motor will be released. Remove the material from the work table and click the “Yes” option on the "Continue build?" window that appears.
 * For more assistance, view this video: MakerBot Cupcake CNC Test ExtrusionPrinting Procedure Step 6.2.jpg
 * 7. Sit back and watch the MakerBot Cupcake CNC print your object.
 * As an example, here is a video of the MakerBot Cupcake CNC print a wrench:MakerBot Cupcake CNC Printing


text:
User talk:Thedinesh4u

Dinesh Ojha
Dinesh Ojha is a person who live a Raikwar Bichawa VDC 1 Rajghat Kanchanpur Nepal. He is a student of Management. Now he study BBA-BI in Crescent college of Management Dhangadhi, Kailali, Nepal. He passed +2 from Sudur Paschimanchal Higher secondary school Dhangadhi, Kailali Nepal and SLC from Shree saraswati higher secondary school Geta kailali nepal and he read Class 6,7,8 In Beena secondary School Bichawa Kanchanpur nepal and Primary level he read in Nawajoty Primary school Rajghat kanchanpur nepal. Now he leave in Dhangadhi Chatakpur Kailali Nepal......

title: User talk:Thedinesh4u


text:
User talk:Beeswaxcandle

 Hello Beeswaxcandle, and welcome to Wikiversity! If you need help, feel free to visit my talk page, or contact us and ask questions. After you leave a comment on a talk page, remember to sign and date; it helps everyone follow the threads of the discussion. The signature icon in the edit window makes it simple. All users are expected to abide by our Privacy policy, Civility policy, and the Terms of Use while at Wikiversity.

To get started, you may

 * Take a guided tour and learn to edit.
 * Visit a (kind of) random project.
 * Browse Wikiversity, or visit a portal corresponding to your educational level: pre-school, primary, secondary, tertiary, non-formal education.
 * Find out about research activities on Wikiversity.
 * Explore Wikiversity with the links to your left.

 * Read an introduction for teachers and find out how to write an educational resource for Wikiversity.
 * Give feedback about your initial observations
 * Discuss Wikiversity issues or ask questions at the colloquium.
 * Chat with other Wikiversitans on #wikiversity-en.
 * Follow Wikiversity on twitter (http://twitter.com/Wikiversity) and identi.ca (http://identi.ca/group/wikiversity).

You don't need to be an educator to edit. You only need to be bold to contribute and to experiment with the sandbox or your userpage. See you around Wikiversity! --Ottava Rima (talk) 03:25, 24 September 2011 (UTC)

title: User talk:Beeswaxcandle


text:
User talk:MJ Mitchell

 Hello MJ Mitchell, and welcome to Wikiversity! If you need help, feel free to visit my talk page, or contact us and ask questions. After you leave a comment on a talk page, remember to sign and date; it helps everyone follow the threads of the discussion. The signature icon in the edit window makes it simple. All users are expected to abide by our Privacy policy, Civility policy, and the Terms of Use while at Wikiversity.

To get started, you may

 * Take a guided tour and learn to edit.
 * Visit a (kind of) random project.
 * Browse Wikiversity, or visit a portal corresponding to your educational level: pre-school, primary, secondary, tertiary, non-formal education.
 * Find out about research activities on Wikiversity.
 * Explore Wikiversity with the links to your left.

 * Read an introduction for teachers and find out how to write an educational resource for Wikiversity.
 * Give feedback about your initial observations
 * Discuss Wikiversity issues or ask questions at the colloquium.
 * Chat with other Wikiversitans on #wikiversity-en.
 * Follow Wikiversity on twitter (http://twitter.com/Wikiversity) and identi.ca (http://identi.ca/group/wikiversity).

You don't need to be an educator to edit. You only need to be bold to contribute and to experiment with the sandbox or your userpage. See you around Wikiversity! --Ottava Rima (talk) 03:26, 24 September 2011 (UTC)

Blocked and locked for cross-wiki vandalism and apparent sock puppetry
As Dust17, as MJ Mitchell, and as Gimmy Wails. See global lock. --Abd 23:06, 28 September 2011 (UTC)

title: User talk:MJ Mitchell


text:
User talk:Dust17

 Hello Dust17, and welcome to Wikiversity! If you need help, feel free to visit my talk page, or contact us and ask questions. After you leave a comment on a talk page, remember to sign and date; it helps everyone follow the threads of the discussion. The signature icon in the edit window makes it simple. All users are expected to abide by our Privacy policy, Civility policy, and the Terms of Use while at Wikiversity.

To get started, you may

 * Take a guided tour and learn to edit.
 * Visit a (kind of) random project.
 * Browse Wikiversity, or visit a portal corresponding to your educational level: pre-school, primary, secondary, tertiary, non-formal education.
 * Find out about research activities on Wikiversity.
 * Explore Wikiversity with the links to your left.

 * Read an introduction for teachers and find out how to write an educational resource for Wikiversity.
 * Give feedback about your initial observations
 * Discuss Wikiversity issues or ask questions at the colloquium.
 * Chat with other Wikiversitans on #wikiversity-en.
 * Follow Wikiversity on twitter (http://twitter.com/Wikiversity) and identi.ca (http://identi.ca/group/wikiversity).

You don't need to be an educator to edit. You only need to be bold to contribute and to experiment with the sandbox or your userpage. See you around Wikiversity! --Ottava Rima (talk) 03:26, 24 September 2011 (UTC)

title: User talk:Dust17


text: File:LTspice sim - LED comparators.jpg

title: File:LTspice sim - LED comparators.jpg


text: File:Boolean Logic.jpg

title: File:Boolean Logic.jpg


text:
Engineering Projects/Bridges/Howard Community College/fall2011/501 DAS/Week 0 (Sept. 12 - Sept. 18, 2011)

Link back to 501_DAS

This is our new team 501_DAS for Bridges project. We have three team members: Angele Bynum, Di Zhang and Syed Sami Ahmed. The goal of the Bridges project is to build a spaghetti bridge which can be loaded with as much weight as possible. Angele and Syed started doing research for the design of bridges and Di was responsible for the software part. We found out that previous semester teams used Dreamweaver. However, the particular software is not a free resource and nobody knows how to use it, we decided to use a software that we already know. Also, we had a general idea for the design. The bridge will be arch structure. We are going to use Pratt Truss pattern to connect two archs spanning the width of the bridge on top. After reading the rules of the contest, we know that the dimension of the bridge will be min 1m for length and max 50cm for total height. The very bottom support part to the top support part should be max 10cm. We are going to do more research for the detail design of the bridge.