text:
User:Eml5526.s11.team7/HW2

Problem Description

 * Derive the one-dimensional partial differential equation (PDE) for a bar under transient heating conditions.

Given

The PDE for a bar under transient heating conditions is defined as:

 * $$\frac{\partial{}}{\partial{x}}\left[ A(x)k(x)\frac{\partial{u}}{\partial{x}} \right] + f(x,t) = mc\frac{\partial{u}}{\partial{t}}$$

Note that this is very similar to the stress analysis of an elastic bar under one-dimensional (uniaxial) loading.

Since the bar is heated dynamically, the applied heat flow per unit volume, r, is a function of distance, x , as well as time, t. This is shown in the free body diagram (FBD) to the right. Details of the remaining heat expressions will be discussed in the solution below. The dotted line in the figure represents the centerline, or axis, of the bar.

Solution
Assumptions:
 * The bar satisfies Fourier's Law of thermal conduction.
 * Conservation of energy is obeyed.
 * Constant density (i.e. $$\rho (x) = \rho (x + \Delta x)$$)

First perform a heat transfer balance on the bar using the free body diagram above. The heat from change in temperature is equal to the heat applied (generated) plus the heat flow into the control volume. Note that the heat applied to the bar, r(x,t), is defined per unit volume. For consistency and unit agreement it can be multiplied by the cross-sectional area, A(x), and expressed per unit length, f(x,t). All three remaining terms in equation 2.1.1 will be measured in watts.

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

$$ \displaystyle \text{ Heat From Change In Temp } = \text{ Heat Applied } - \text{ Heat Flow In }$$ (2.1.1)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle \text{ Heat Applied }=r(x+\frac{\Delta x}{2},t)A(x+\frac{\Delta x}{2},t)\Delta x = f(x+\frac{\Delta x}{2},t)\Delta x$$
 * style="width:95%" |
 * style="width:95%" |
 * Defined as the average at the center of control volume.

(2.1.2)
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle \text{ Heat Flow In } = -[Q(x) + Q(x+\Delta x)] = $$
 * style="width:95%" |
 * style="width:95%" |

$$\displaystyle -[q(x)A(x)n(x) + q(x+\Delta x)A(x+\Delta x)n(x+\Delta x)]$$

$$\displaystyle \rightarrow -[-q(x)A(x) + q(x+\Delta x)A(x+\Delta x)]$$
 * The negative sign before the brackets is because heat is flowing out of the control volume.
 * Q is heat flux density, measured in W·m−2. q is heat flux, measured in J·s−1 or W.

(2.1.3) To determine the heat due to change in temperature, the time rate of change in internal energy for the control volume, Ω is used.
 *
 * }

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

$$ \displaystyle \text{Heat from Change in Temp}=m \cdot c \cdot \dot{\Delta T}$$ (2.1.4)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * where,
 * Heat is measured in W
 * m = mass, in kg
 * c = heat capacity, in J·(kg·K)−1 or W·s·(kg·K)−1
 * $$\dot{\Delta T}$$ = rate of temperature change, in K·s−1

Additionally, mass can be expressed as:

 * $$\displaystyle m(x) = \rho \cdot A(x) \cdot \Delta x$$

 * where,
 * ρ = density, in kg·m−3
 * A(x) = cross-sectional area at point x, in m2
 * Δx = thickness of the control volume, in m

 * and taking the change in time for temperature change to zero leads to:

 * $$\dot{\Delta T}=\frac{du}{dt}$$

 * where,
 * u = temperature, in K
 * t = time, in s

Therefore the rate of change in internal energy can be expressed as:

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

$$ \displaystyle \text{ Internal Energy }= \rho A(x) c \frac{\partial{u}}{\partial{t}}\Delta x$$ (2.1.5)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Substituting equations 2.1.2, 2.1.3, and 2.1.5 into the conservation of energy equation, 2.1.1, yields:

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

$$ \displaystyle \rho A(x) c \frac{\partial{u}}{\partial{t}}\Delta x = f(x+\frac{\Delta x}{2},t)\Delta x $$
 * style="width:95%" |
 * style="width:95%" |

$$\displaystyle-[-q(x)A(x) + q(x+\Delta x)A(x+\Delta x)] $$ (2.1.6)
 *
 * }

Dividing this equation by Δx and recognizing that as Δx approaches zero:

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

$$ \displaystyle \lim_{\Delta x \to 0} \frac{q(x+\Delta x)A(x+\Delta x)-q(x)A(x)}{\Delta x} = \frac{d}\left[ q(x)A(x) \right]$$ (2.1.7)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Equation 2.1.6 can be rewritten as:

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

$$ \displaystyle -\frac{d}{dx}\left[ q(x)A(x) \right] + f(x,t) = \rho A(x) c \frac{\partial{u}}{\partial{t}}$$ (2.1.8)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Similar to equation 2.1.4 above, Fourier's Law can alternatively be written as:

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

$$ \displaystyle q(x) = -k(x) \frac {du}{dx}$$ (2.1.9)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * where,
 * k(x) = thermal conductivity, in W·(m·K)−1

Substituting into equation 2.1.8 for the dynamic case yields:

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

$$ \displaystyle \frac{\partial{}}{\partial{x}}\left[ A(x) k(x) \frac{\partial{u}}{\partial{x}} \right] + f(x,t) = \rho A(x) c \frac{\partial{u}}{\partial{t}}$$ (2.1.10) The PDE for the case of transient heating in a bar has been proven. Note that each term is now expressed with the units W·m−1.
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 *
 * }

Author
Philip Flater

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

$$ \displaystyle [{b}_{ik}]= \begin{bmatrix} 1&1&1 \\  2&-1&3 \\  3&2&6\\ \end{bmatrix}$$ (2.2.1)
 *
 * }

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

(2.2.2)
 * $$ \displaystyle \underline {v} = 5\underline{a}_{1}- 7\underline{a}_{2}- 4\underline{a}_{3}$$
 *
 *
 * }

 * Part 1: Compute $$ \displaystyle det [{b}_{ik}]$$

 * Part 2: Find $$ \displaystyle \underline {\Gamma} (\underline{b}_{1},\underline{b}_{2},\underline{b}_{3}) = \underline{K}, det \underline{\Gamma}$$

 * Part 3: Find $$ \displaystyle \underline {F} = \left \{ {F}_{i} \right \}= \left \{\underline{b}_{i} \cdot \underline{V}\right \} $$

 * Part 4: Solve (5) p.7-3 for $$ \displaystyle \underline {d} = \left \{ {V}_{i} \right \} $$

 * Part 5: Use (1) p.7-4 to find $$ \displaystyle \overrightarrow {\underline{K}} \underline {d} = \overrightarrow {\underline{F}} $$

 * Part 6: Solve for $$ \displaystyle \underline {d}_{i} $$ and compare to $$ \displaystyle \underline {d} $$ Part 4

 * Part 7: Observe the symetric properties of $$ \displaystyle \underline {K} $$ and $$ \displaystyle \overrightarrow {\underline{K}} $$.  Discuss the pros and cons of both methods.

Part 1
Compute $$ \displaystyle det [{b}_{ik}]$$

$$ \displaystyle det [{b}_{ik}]= det \begin{bmatrix} 1&1&1 \\  2&-1&3 \\  3&2&6\\ \end{bmatrix}$$

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

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

 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$ \displaystyle det [{b}_{ik}] = -8 $$

Verified with WolfromAlpha

(2.2.3)
 *
 * }

 * style = |
 * }
 * }

Part 2
Find $$ \displaystyle \underline {\Gamma} (\underline{b}_{1},\underline{b}_{2},\underline{b}_{3}) = \underline{K}, det \underline{\Gamma}$$

From (4) p.7-2, the "Stiffness" matrix $$ \displaystyle \underline{K} $$ is equal to the Gram matrix $$ \displaystyle {\Gamma} (\underline{b}_{1},...,\underline{b}_{n}) $$

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

Also from (4) p.7-2, $$ \displaystyle \underline{K}=[\underline{K}_{ij}] $$

(2.2.4)
 *
 * }

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

From (3) p.7-2, $$ \displaystyle [\underline{K}_{ij}]=\underline{b}_{i} \cdot \underline{b}_{j} $$ (2.2.5)
 *
 * }

Using equation (2.2.1)

$$ \displaystyle \underline{b}_{i} \cdot \underline{b}_{j}= \begin{bmatrix} 1&1&1 \\  2&-1&3 \\  3&2&6\\ \end{bmatrix}

\begin{bmatrix} 1&1&1 \\  2&-1&3 \\  3&2&6\\ \end{bmatrix}^T=

\begin{bmatrix} 1&1&1 \\  2&-1&3 \\  3&2&6\\ \end{bmatrix}

\begin{bmatrix} 1&2&3 \\  1&-1&2 \\  1&3&6\\ \end{bmatrix}$$

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

 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

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

$$ \displaystyle \underline{K}= \begin{bmatrix} 3&4&11 \\  4&14&22 \\  11&22&49\\ \end{bmatrix}=\underline {\Gamma}(\underline{b}_{1},...,\underline{b}_{n}) $$

(2.2.6)
 *

 * }

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

$$ \displaystyle det \underline {\Gamma} = 65 $$

(2.2.7)
 *

 * }

Verified with WolfromAlpha

 * style = |
 * }
 * }

Part 3
Find $$ \displaystyle \underline {F} = \left \{ {F}_{i} \right \}= \left \{\underline{b}_{i} \cdot \underline{V}\right \} $$

Using equation (2.2.1) and (2.2.2)

$$ \displaystyle \underline {F} = \left \{\underline{b}_{i} \cdot \underline{V}\right \}= \begin{bmatrix} 1&1&1 \\  2&-1&3 \\  3&2&6\\ \end{bmatrix} \begin{bmatrix} 5 \\  -7 \\  -4 \\ \end{bmatrix} $$

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

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

 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$ \displaystyle \underline {F} = \begin{bmatrix} -6 \\  5 \\  -23 \\ \end{bmatrix} $$

Verified with WolfromAlpha

(2.2.8)
 *

 * }

 * style = |
 * }
 * }

Part 4
Solve (5) p.7-3 for $$ \displaystyle \underline {d} = \left \{ {V}_{i} \right \} $$

$$ \displaystyle \underline {K} $$ $$ \displaystyle \underline {d}= \underline {F} $$

$$ \displaystyle \underline {d}= \underline {K}^{-1} \underline {F} $$

Using equation (2.2.6) and (2.2.8)

$$ \displaystyle \underline {d}= \begin{bmatrix} 3&4&11 \\  4&14&22 \\  11&22&49\\ \end{bmatrix}^{-1}

\begin{bmatrix} -6 \\  5 \\  -23 \\ \end{bmatrix} $$

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

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

 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$ \displaystyle \underline {d}= \frac{1}{8} \begin{bmatrix} -6 \\  5 \\  -23 \\ \end{bmatrix} $$

Verified with WolfromAlpha

(2.2.9)
 *

 * }

 * style = |
 * }
 * }

Part 5
Use (1) p.7-4 to find $$ \displaystyle \overrightarrow {\underline{K}} \underline {d} = \overrightarrow {\underline{F}} $$

From (1) p.7-4: $$ \displaystyle  \underline{w}_{i} \cdot \underline {\underline{P}} (\underline{v}) = 0  $$ where $$ \displaystyle \forall i=1,...,n$$

Note that (5) p.7-2 can also be obtained by multiplying $$ \underline {\underline{P}}(\underline{v}) $$ in (1) p.7-2 with any linear independent family of vectors (basis). For example $$ \displaystyle \left \{ \underline{w}_{i}, i=1,...,n \right \}. $$

→ $$ \displaystyle \underline{w}_{i} \cdot \underline {\underline{P}} (\underline{v})=0 $$
 where $$ \displaystyle \forall i=1,...,n$$

Using $$ \displaystyle \underline {a}_{i}$$ as an orthonormal basis

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

$$ \displaystyle \underline {a}_{i}=

\begin{bmatrix} 1&0&0 \\  0&1&0 \\  0&0&1\\ \end{bmatrix}$$

(2.2.10)
 *

 * }

Mulitply $$ \displaystyle \underline {a}_{i}$$ with equation (1) p.7-2 we get $$ \displaystyle \underline {a}_{i} \overrightarrow {\underline{K}} \underline {d} = \underline {a}_{i} \overrightarrow {\underline{F}} $$

Which equals

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

$$ \displaystyle \begin{bmatrix} 1&0&0 \\  0&1&0 \\  0&0&1\\ \end{bmatrix} \begin{bmatrix} 1&2&3 \\  1&-1&2 \\  1&3&6\\ \end{bmatrix} \underline {d}= \begin{bmatrix} 1&0&0 \\  0&1&0 \\  0&0&1\\ \end{bmatrix} \begin{bmatrix} 5 \\ -7 \\ -4 \\ \end{bmatrix} $$

(2.2.11)
 *

 * }

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

$$ \displaystyle \begin{bmatrix} 1&2&3 \\  1&-1&2 \\  1&3&6\\ \end{bmatrix} \underline {d}= \begin{bmatrix} 5 \\ -7 \\ -4 \\ \end{bmatrix}$$

(2.2.12)
 *

 * }

Giving us

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

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

 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$ \displaystyle \overrightarrow {\underline{K}} = \begin{bmatrix} 1&2&3 \\  1&-1&2 \\  1&3&6\\ \end{bmatrix} $$       (2.2.13)
 *

 * }

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

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

 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$ \displaystyle \overrightarrow {\underline{F}}= \begin{bmatrix} 5 \\ -7 \\ -4 \\ \end{bmatrix}$$

(2.2.14)
 *

 * }

 * style = |
 * }
 * }

 * style = |
 * }
 * }

Part 6
Solve for $$ \displaystyle \underline {d}_{i} $$ and compare to $$ \displaystyle \underline {d} $$ Part 4

Since $$ \displaystyle \overrightarrow {\underline{K}} = {\underline{K}} $$ and $$ \displaystyle \overrightarrow {\underline{F}} = {\underline{F}} $$

Then $$ \displaystyle \underline {d}_{i} = \underline {d} $$

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

 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$ \displaystyle \underline {d}_{i} =\frac{1}{8} \begin{bmatrix} -6 \\  5 \\  -23 \\ \end{bmatrix} $$

(2.2.15)
 *

 * }

Part 7
$$ \displaystyle \underline {K} $$ is symetric, which makes sense because it is the stiffness matrix for a material. $$ \displaystyle \overrightarrow {\underline{K}} $$ is symetric because the basis vector was orthonormal (basically the identiy matrix). In this case it was just as simple as using the Bubnov-Galerkin method because we selected the most basic orthonormal vector. Finding another orthonormal vector for the Petrov-Galerkin is not that difficult but it adds one extra step compared to the Bubnov-Galerkin method.

Author
Brandonhua 02:06, 2 February 2011 (UTC)

Problem Description
Use $$\left\{ \right\} $$as basis, let :{| style="width:100%" border="0" $$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{\mathbf{w}} = \sum\limits_i {{\mathbf{a}}_i}

$$     (Eq 2.3.1) Then
 *

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

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

\begin{array}{ccccccccccccccc} {{\mathbf{w}} \cdot {\mathbf{P}}\left( {\mathbf{v}} \right) = 0}&{\forall {\mathbf{w}} \in {\mathbb{R}^n}} \end{array}

$$     (Eq 2.3.2) is equal to
 *

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

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

\begin{array}{ccccccccccccccc} {{\mathbf{w}} \cdot {\mathbf{P}}\left( {\mathbf{v}} \right) = 0}&{\forall \left\{ {{\beta _1}, \ldots ,{\beta _n}} \right\} \in {\mathbb{R}^n}} \end{array}

$$     (Eq 2.3.3) Such that $${\mathbf{w}} = \sum\limits_i $$
 *

 * }

Find
Show Equation 3 is equivalent to
 * {| style="width:100%" border="0"

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

\begin{array}{ccccccccccccccc} {{{\mathbf{a}}_i} \cdot {\mathbf{P}}\left( {\mathbf{v}} \right) = 0}&{\forall i = 1, \ldots ,n} \end{array}

$$     (Eq 2.3.4)
 *

 * }

Solution
Since$$ \left\{ {{\beta _1}, \ldots ,{\beta _n}} \right\} $$are arbitrary, let
 * {| style="width:100%" border="0"

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

{\beta _1} = 1,{\beta _2} = {\beta _3} = \cdots  = {\beta _n} = 0

$$     (Eq 2.3.5) Then
 *

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

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

{\mathbf{w}} = {{\mathbf{a}}_1}

$$     (Eq 2.3.6) Equation 3 can be written as
 *

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

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

{{\mathbf{a}}_1} \cdot {\mathbf{P}}\left( {\mathbf{v}} \right) = 0

$$     (Eq 2.3.7) Similarly, let
 *

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

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

{\beta _1} = {\beta _2} = \cdots  = {\beta _{n - 1}} = 0,{\beta _n} = 1

$$     (Eq 2.3.8) Then
 *

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

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

{\mathbf{w}} = {{\mathbf{a}}_n}

$$     (Eq 2.3.9) Equation 3 can be written as
 *

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

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

{{\mathbf{a}}_n} \cdot {\mathbf{P}}\left( {\mathbf{v}} \right) = 0

$$     (Eq 2.3.10) Thus, Equation 3 is identical to Equation 4.
 *

 * }

Author
Jiang Jin

Problem Description
Show:

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

$$ \displaystyle \int \frac{x^2}{1+x}dx=\frac{x^2}{2}-x+\log(1+x)+k $$ (2.4.1)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Given
Prove the following through integration by parts:

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

$$ \displaystyle \int log(x)dx=xlog(x)-x $$ (2.4.2)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solution
Using a similar derivation as p.48 of "A First Course in Finite Elements."

Looking first at using the product rule for two functions:
 * {| style="width:100%" border="0"

$$ \displaystyle d(uv)=udv+vdu $$ (2.4.3) Rearranging Eq. 2.4.3 gives:
 * style="width:95%" |
 * style="width:95%" |
 *

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

$$ \displaystyle udv=d(uv)-vdu$$ (2.4.4)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Integrating Eq. 2.4.4:
 * {| style="width:100%" border="0"

$$ \displaystyle \int udv=\int d(uv)-\int vdu$$ (2.4.5) Note the first term on the right hand side of Eq. 2.4.5 becomes the following from the fundamental theorem of calculus:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

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

$$ \displaystyle \int d(uv)=uv$$ (2.4.6) Plugging Eq. 2.4.6 into Eq. 2.4.5 gives the following familiar equation used for integration by parts:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

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

$$ \displaystyle \int udv=(uv)-\int vdu$$ (2.4.6) $$\displaystyle \text{Returning to Eq. 2.4.2 using } u=log(x) \text{, } du=\frac{1}{x}\text{, } dv=dx\text{ and } v=x$$:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

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

$$ \displaystyle \int log(x)dx= xlog(x)-\int\frac{1}{x}xdx$$ (2.4.7) Which yields:
 * style="width:95%" |
 * style="width:95%" |
 *

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

$$ \displaystyle \int log(x)dx= xlog(x)-x$$ (2.4.8) Which is in agreement with Eq. 2.4.2.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 *

 * }

Given
Prove the following through integration by parts:

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

$$ \displaystyle \int xlog(x)dx=\frac{1}{2}x^2\Bigg[log(x)-\frac{1}{2}\Bigg] $$ (2.4.9)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solution
Following from Eq. 2.4.6:

$$\displaystyle u=log(x), du=\frac{1}{x}, dv=xdx,\text{ and } v=\frac{1}{2}x^2$$

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

$$ \displaystyle \rightarrow\int xlog(x)dx=\frac{x^2}{2}log(x)-\int \frac{x^2}{2}\frac{1}{x}dx=\frac{x^2}{2}log(x)-\frac{x^2}{4} $$ (2.4.10)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Factoring out $$\displaystyle\frac{x^2}{2}$$ gives:

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

$$ \displaystyle \int xlog(x)dx=\frac{1}{2}x^2[log(x)-\frac{1}{2}] $$ (2.4.11)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 *

 * }

Which agrees with Eq 2.4.9.

Given
Find the following:

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

$$ \displaystyle \int \frac{x^2}{1+bx}dx $$ (2.4.12)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solution
Using integration by parts, so following Eq 2.4.6:

$$\displaystyle u=x^2, du=2xdx, dv=\frac{1}{1+bx},\text{ and } v=\frac{1}{b}log(1+bx)$$

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

$$ \displaystyle\rightarrow \int \frac{x^2}{1+bx}dx=\frac{x^2}{b}log(1+bx)-\int \frac{2x}{b}log(1+bx)dx=$$
 * style="width:95%" |
 * style="width:95%" |

$$ \frac{x^2}{b}log(1+bx)-\frac{2}{b}\int xlog(1+bx)dx $$ (2.4.13)
 *

 * }

Looking at the far right integral of Eq. 2.4.13 and using substitution of variables for easier integration:

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

$$ \displaystyle z=1+bx $$ (2.4.14)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Rearrangement yields:

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

$$ \displaystyle x=\frac{z-1}{b} $$ (2.4.15)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Lastly, taking the derivative of 2.4.15:

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

$$ \displaystyle dx=\frac{1}{b}dz $$ (2.4.16)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Subsituting 2.4.14-2.4.16 into the far right integral of 2.4.13 yields (omitting the constant coefficients at this time):

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

$$ \displaystyle \int\frac{z-1}{b} log(z)\frac{1}{b}dz=\frac{1}{b^2}\Bigg[\int zlog(z)dz-\int log(z)dz\Bigg] $$ (2.4.17)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Notice the first integral on the right hand side is the same as part two, Eq. 2.4.10 and the second integral on the right hand side is the same as part one, Eq. 2.4.8. Using these equations on Eq. 2.4.17:

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

$$ \displaystyle \int\frac{1}{b^2}\Bigg[\int zlog(z)dz-\int log(z)dz\Bigg]=\frac{1}{b^2}\Bigg[\frac{z^2log(z)}{2}-\frac{z^2}{4}-zlog(z)+z\Bigg] $$ (2.4.18)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Factoring out a z, and then substituting 2.4.14 in for z gives:

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

$$ \displaystyle \frac{z}{b^2}\Bigg[\frac{zlog(z)}{2}-\frac{z}{4}-log(z)+1\Bigg]=$$
 * style="width:95%" |
 * style="width:95%" |

$$\frac{1+bx}{b^2}\Bigg[\frac{log(1+bx)}{2}+\frac{bxlog(1+bx)}{2}-\frac{1+bx}{4}-log(1+bx)+1\Bigg] $$ (2.4.19)
 *

 * }

Multiplying the terms out:

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

$$ \displaystyle \frac{log(1+bx)}{2b^2}+\frac{xlog(1+bx)}{2b}-\frac{1}{4b^2}-\frac{x}{4b}-\frac{log(1+bx)}{b^2}+\frac{1}{b^2}+$$
 * style="width:95%" |
 * style="width:95%" |

$$\frac{xlog(1+bx)}{2b}+\frac{x^2log(1+bx)}{2}-\frac{x}{4b}-\frac{x^2}{4}-\frac{xlog(1+bx)}{b}+\frac{x}{b} $$ (2.4.20)
 *

 * }

Plugging into overall equation 2.4.13 and simplifying greatly yields:

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

$$ \displaystyle \int \frac{x^2}{1+bx}dx=\frac{log(1+bx)}{b^3}+\frac{x^2}{2b}-\frac{x}{b^2}-\frac{3}{2b^3} $$ (2.4.21)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 *

 * }

Given
Find the following:

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

$$ \displaystyle \int \frac{x^2}{a+bx}dx $$ (2.4.21)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solution
Using integration by parts, so following Eq 2.4.6:

$$\displaystyle u=x^2, du=2xdx, dv=\frac{1}{a+bx},\text{ and } v=\frac{1}{b}log(a+bx)$$

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

$$ \displaystyle\rightarrow \int \frac{x^2}{a+bx}dx=\frac{x^2}{b}log(a+bx)-\int \frac{2x}{b}log(a+bx)dx=$$
 * style="width:95%" |
 * style="width:95%" |

$$\frac{x^2}{b}log(a+bx)-\frac{2}{b}\int xlog(a+bx)dx $$ (2.4.22)
 *

 * }

Looking at the far right integral of Eq. 2.4.13 and using substitution of variables for easier integration:

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

$$ \displaystyle z=a+bx $$ (2.4.23)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Rearrangement yields:

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

$$ \displaystyle x=\frac{z-a}{b} $$ (2.4.24)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Lastly, taking the derivative of 2.4.24:

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

$$ \displaystyle dx=\frac{1}{b}dz $$ (2.4.25)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Subsituting 2.4.23-2.4.25 into the far right integral of 2.4.22 yields (omitting the constant coefficients at this time):

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

$$ \displaystyle \int\frac{z-a}{b} log(z)\frac{1}{b}dz=\frac{1}{b^2}\Bigg[\int zlog(z)dz-a\int log(z)dz\Bigg] $$ (2.4.26)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Notice the first integral on the right hand side is the same as part two, Eq. 2.4.10 and the second integral on the right hand side is the same as part one, Eq. 2.4.8. Using these equations on Eq. 2.4.26:

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

$$ \displaystyle \int\frac{1}{b^2}\Bigg[\int zlog(z)dz-a\int log(z)dz\Bigg]=\frac{1}{b^2}\Bigg[\frac{z^2log(z)}{2}-\frac{z^2}{4}-azlog(z)+az\Bigg] $$ (2.4.27)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Factoring out a z, and then substituting 2.4.14 in for z gives:

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

$$ \displaystyle \frac{z}{b^2}\Bigg[\frac{zlog(z)}{2}-\frac{z}{4}-alog(z)+a\Bigg]=\frac{a+bx}{b^2}\Bigg[\frac{alog(a+bx)}{2}+\frac{bxlog(a+bx)}{2}-$$
 * style="width:95%" |
 * style="width:95%" |

$$\frac{a+bx}{4}-alog(a+bx)+a\Bigg] $$ (2.4.28)
 *

 * }

Multiplying the terms out:

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

$$ \displaystyle \frac{a^2log(a+bx)}{2b^2}+\frac{axlog(a+bx)}{2b}-\frac{a^2}{4b^2}-\frac{ax}{4b}-\frac{a^2log(a+bx)}{b^2}+\frac{a^2}{b^2}+$$
 * style="width:95%" |
 * style="width:95%" |

$$\frac{axlog(a+bx)}{2b}+\frac{x^2log(a+bx)}{2}-\frac{ax}{4b}-\frac{x^2}{4}-\frac{axlog(a+bx)}{b}+\frac{ax}{b} $$ (2.4.29)
 *

 * }

Plugging into overall equation 2.4.13 and simplifying greatly yields:

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

$$ \displaystyle \int \frac{x^2}{a+bx}dx=\frac{a^2log(a+bx)}{b^3}+\frac{x^2}{2b}-\frac{ax}{b^2}-\frac{3a^2}{2b^3} $$ (2.4.30)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 *

 * }

Given
Find the exact solution of:

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

$$ \displaystyle \frac{d}{dx}\Bigg[(2+3x)\frac{du}{dx}\Bigg]+5x=0 $$ (2.4.31)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

With the following boundary conditions:

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

$$ \displaystyle 1: u(1)=4 $$ (2.4.32)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

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

$$ \displaystyle 2: -\frac{du}{dx}|_{x=0} =6 $$ (2.4.33)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solution
Rearranging 2.4.31 and integrating:

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

$$ \displaystyle \int d\Bigg[(2+3x)\frac{du}{dx}\Bigg]=\int-5xdx $$ (2.4.34)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Which gives with rearrangement and integration:

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

$$ \displaystyle \int du=\int (\frac{-\frac{5}{2}x^2}{2+3x}+\frac{C1}{2+3x})dx $$ (2.4.35)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Where C1 is a constant of integration. The first term in the integral on the right hand side is easily seen to be the same as part 4 (Eq. 2.4.30) where a=2 and b=3. This gives the folloing solution to the first term in the integral on the right hand side:

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

$$ \displaystyle \int\frac{\frac{-5}{2}x^2}{2+3x}dx=\frac{-5}{2}\Bigg[\frac{4log(2+3x)}{3^3}+\frac{x^2}{6}-\frac{2x}{9}+C2\Bigg] $$ (2.4.36) Where C2 is a constant of integration. Solving the second term now:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

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

$$ \displaystyle C1\int\frac{1}{2+3x}dx=\frac{C1}{3}log(2+3x)+C2=C1ln(2+3x)+C2$$ (2.4.37)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Notice the 3 is absorbed into the integrating constant C1 after the second equal's sign. Adding 2.4.37 and 2.4.36 and combining constants into C2:

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

$$ \displaystyle u=\frac{-5}{2}\Bigg[\frac{4log(2+3x)}{3^3}+\frac{x^2}{6}-\frac{2x}{9}\Bigg] +C1log(2+3x)+C2$$ (2.4.38)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Taking the first derivative of Eq. 2.4.38 gives:

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

$$ \displaystyle u'=\frac{-5}{2}\Bigg[(\frac{4}{27})(\frac{3}{2+3x})+\frac{x}{3}-\frac{2}{9}\Bigg]+\frac{3C1}{2+3x}$$ (2.4.39)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Using BC2 (Eq. 2.4.33) gives:

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

$$ \displaystyle C1=-4$$ (2.4.40)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Using BC1 (Eq. 2.4.32) gives:

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

$$ \displaystyle C2=4+\frac{5}{2}\Bigg[\frac{4log(5)}{27}+\frac{1}{6}-\frac{2}{9}\Bigg]+4log(5)$$ (2.4.41)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Giving the Final Equation for u:

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

$$ \displaystyle u=\frac{-5}{2}\Bigg[\frac{4log(2+3x)}{27}+\frac{x^2}{6}-\frac{2x}{9}\Bigg] -4log(2+3x)+4+$$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$\frac{5}{2}\Bigg[\frac{4log(5)}{27}+\frac{1}{6}-\frac{2}{9}\Bigg]+4log(5) $$ (2.4.42)
 *

 * }

Given
Graph u(x) (Eq. 2.4.42)

Author
Braden Snook

Eml5526.s11.team7.snook 02:25, 2 February 2011 (UTC)

Problem Description

 * Show that 2.5.1 $$\Leftrightarrow $$ 2,5.2

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

$$ \displaystyle \overrightarrow{b_{i}}\cdot P\left (\overrightarrow{v} \right ) = 0$$ Where $$i\in $$ $$ \left \{ 1,2,3,.....n \right \}$$ (2.5.1)
 * style="width:95%" |
 * style="width:95%" |
 *

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

$$ \displaystyle \overrightarrow w \cdot P\left (\overrightarrow{v} \right ) = 0;$$      $$ \forall \left\{ \alpha_{1},\alpha_{2},\alpha_{3}........\alpha_{n}\right\}$$$$\in\mathbb{R}^n$$
 * style="width:95%" |
 * style="width:95%" |

Where $$\overrightarrow w = \sum_{i=1}^{n}\alpha_{i} \cdot \overrightarrow{b_{i}}$$ (2.5.2)
 *

 * }

Solution
Multiply both sides of the equation 2.5.1 by $$ \alpha_{i} $$
 * {| style="width:100%" border="0"

$$ \displaystyle \alpha_{i}\cdot\overrightarrow{b_{i}}\cdot P\left (\overrightarrow{v} \right ) = \alpha_{i}\cdot 0;$$ (2.5.3)
 * style="width:95%" |
 * style="width:95%" |
 *

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

$$ \displaystyle \alpha_{i}\cdot\overrightarrow{b_{i}}\cdot P\left (\overrightarrow{v} \right ) = 0;$$ (2.5.4)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

when i=1 in equation 2.5.3, we get
 * {| style="width:100%" border="0"

$$ \displaystyle \alpha_{1}\cdot\overrightarrow{b_{1}}\cdot P\left (\overrightarrow{v} \right ) = 0;$$ (2.5.5)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

when i=2 in equation 2.5.3, we get
 * {| style="width:100%" border="0"

$$ \displaystyle \alpha_{2}\cdot\overrightarrow{b_{2}}\cdot P\left (\overrightarrow{v} \right ) = 0;$$ (2.5.6)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

when i=3 in equation 2.5.3, we get
 * {| style="width:100%" border="0"

$$ \displaystyle \alpha_{3}\cdot\overrightarrow{b_{3}}\cdot P\left (\overrightarrow{v} \right ) = 0;$$ (2.5.7) . . . . when i=n in equation 2.5.3, we get
 * style="width:95%" |
 * style="width:95%" |
 *

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

$$ \displaystyle \alpha_{n}\cdot\overrightarrow{b_{n}}\cdot P\left (\overrightarrow{v} \right ) = 0;$$ (2.5.8)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Summation of equations 2.5.5 to 2.5.8 can be represented by
 * {| style="width:100%" border="0"

$$ \displaystyle \sum_{i=1}^{n}\alpha_{i}\cdot b{i}\cdot P\left (\overrightarrow{v} \right ) = 0$$ (2.5.9)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

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

$$ \displaystyle \overrightarrow w = \sum_{i=1}^{n}\alpha_{i} \cdot \overrightarrow{b_{i}}$$ (2.5.10) We get
 * style="width:95%" |
 * style="width:95%" |
 *

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

$$ \displaystyle \overrightarrow w \cdot P\left (\overrightarrow{v} \right ) = 0;$$ (2.5.11) Which is equal to equation 2.5.2.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 *

 * }

Author
Srilalithkumar Swaminathan

Problem Description
Consider $$ \displaystyle \boldsymbol{F}=\left \{ 1,cos(i\omega x),sin(i\omega x) \right \} $$ on [0,T] for i=1,2

 * Part 1: Compute Γ(F)

 * Part 2: Find det(Γ)

 * Part 3: Is F an orthogonal basis?

Solution
$$\Gamma_{ij}=\int_{\Omega}b_{i}(x)b_{j}(x)dx$$ where $$ \displaystyle \boldsymbol{F}=\left \{ b_1 (x), ... b_n (x) \right \} $$

The following Matlab script was used to compute parts 1 and 2:

Part 1

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

$$ \displaystyle \Gamma= \begin{bmatrix} \frac{2\pi}{\omega}&0&0&0&0 \\ 0& \frac{\pi}{\omega}  &0 &0 &0 \\ 0& 0 & \frac{\pi}{\omega}  & 0& 0\\ 0&0 & 0 &  \frac{\pi}{\omega} &0 \\ 0& 0 & 0 & 0 & \frac{\pi}{\omega} \end{bmatrix}
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |

$$
 * style = |
 * }
 * }

Part 2
The determinant of a diagonal matrix is the product of the diagonal elements so the determinant is calculated as follows:

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

$$\displaystyle det(\Gamma )=2* (\frac{\pi}{\omega})^5= 2*\frac{\pi^5}{\omega^5}$$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }
 * }

The determinant calculated by matlab agrees with the above solution.

Part 3
$$\Gamma $$ is a diagonal matrix. It must follow that $$ \displaystyle \Gamma_{ij}=\delta_{ij}$$ where $$ \displaystyle \delta_{ij}$$is the Kronicker delta. We conclude that F is a family of orthogonal basis of functions.

Author
Johnathan Whittaker Bullard

Problem Description
Consider $$ \displaystyle \boldsymbol{F}=\left \{ 1,x,x^2,x^3,x^4\right \} $$ on [0,1]

 * Part 1: Compute Γ(F)

 * Part 2: Find det(Γ)

 * Part 3: Is F an orthogonal basis?

Solution
$$\Gamma_{ij}=\int_{\Omega}b_{i}(x)b_{j}(x)dx$$ where $$ \displaystyle \boldsymbol{F}=\left \{ b_1 (x), ... b_n (x) \right \} $$

The following Matlab script was used to compute parts 1 and 2:

Part 1
Matlab yields the following matrix:
 * {| style="width:100%" border="0" align="left"

$$ \displaystyle \Gamma= \begin{bmatrix} 1&\frac{1}{2}&\frac{1}{3}&\frac{1}{4}&\frac{1}{5} \\ \frac{1}{2}& \frac{1}{3}  &\frac{1}{4} &\frac{1}{5} &\frac{1}{6} \\ \frac{1}{3}& \frac{1}{4} & \frac{1}{5}  & \frac{1}{6}& \frac{1}{7}\\ \frac{1}{4}&\frac{1}{5} & \frac{1}{6} & \frac{1}{7} &\frac{1}{8} \\ \frac{1}{5}& \frac{1}{6} & \frac{1}{7} & \frac{1}{8} & \frac{1}{9} \end{bmatrix}
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |

$$
 * style = |
 * }
 * }

Part 2
Matlab yields the determinant as 1/266716800000 which can be assumed to be zero because of numerical rounding.

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

$$\displaystyle det(\Gamma )=0$$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }
 * }

$$ \displaystyle \boldsymbol{F} $$ is not a linearly independent family of functions.

Part 3
$$ \Gamma $$ is not a diagonal matrix. It does not satisfy the condition of $$ \displaystyle \Gamma_{ij}=\delta_{ij}$$ where $$ \displaystyle \delta_{ij}$$is the Kronicker delta. We conclude that F is not not a family of orthogonal basis of functions.

Author
Johnathan Whittaker Bullard

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

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

{w^h}(x) = \sum\limits_{i = 1}^n {{c_i}{b_i}(x)}

$$     (2.8.1)
 *

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

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

{u^h}(x) = \sum\limits_{j = 1}^n {{d_j}{b_j}(x)}

$$     (2.8.2) Show :{| style="width:100%" border="0" $$ \displaystyle
 *

 * }
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

\int\limits_\Omega {{w^h}(x)\underline P ({u^h}(x))dx = 0for\forall {w^h}(x)}  \Leftrightarrow \int\limits_\Omega  {{b_i}(x)\underline P ({u^h}(x))dx = 0}

$$     (2.8.3)
 *

 * }

Solution
Consider the arbitrariness of the weight function

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

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

\{ {c_1},{c_2},...,{c_n}\} = \{ 1,0,...,0\}

$$     (2.8.4)   :{| style="width:100%" border="0" $$ \displaystyle
 *

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

\int\limits_\Omega {{w^h}(x)\underline P ({u^h}(x))dx = 0}  \Leftrightarrow \int\limits_\Omega  {{b_1}(x)\underline P ({u^h}(x))dx = 0}

$$     (2.8.5) Choice 2:
 *

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

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

\{ {c_1},{c_2},...,{c_n}\} = \{ 0,1,0,...,0\}

$$     (2.8.6 )  :{| style="width:100%" border="0" $$ \displaystyle
 *

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

\int\limits_\Omega {{w^h}(x)\underline P ({u^h}(x))dx = 0}  \Leftrightarrow \int\limits_\Omega  {{b_2}(x)\underline P ({u^h}(x))dx = 0}

$$     (2.8.7).
 *

 * }

.

.

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

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

\{ {c_1},{c_2},...,{c_n}\} = \{ 0,0,...,0,1\}

$$     (2.8.8)   :{| style="width:100%" border="0" $$ \displaystyle
 *

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

\int\limits_\Omega {{w^h}(x)\underline P ({u^h}(x))dx = 0)}  \Leftrightarrow \int\limits_\Omega  {{b_n}(x)\underline P ({u^h}(x))dx = 0}

$$     (2.8.9) So    :{| style="width:100%" border="0" $$ \displaystyle
 *

 * }
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

\int\limits_\Omega {{w^h}(x)\underline P ({u^h}(x))dx = 0for\forall {w^h}(x)}  \Leftrightarrow \int\limits_\Omega  {{b_i}(x)\underline P ({u^h}(x))dx = 0}

$$     (2.8.10)
 *

 * }

Author
Zongyi Yang

Problem Description

 * Consider $$\left\{ b_j(x);j=0,1,...,n \right\}$$ when $$\displaystyle b_j(x) = \cos(jx + \phi)$$

 * Select phase shift, $$\displaystyle\phi$$, such that $$\displaystyle b_j(x=0) \ne 0$$, specifically $$\displaystyle\phi = \frac{\pi}{4}$$ and $$\displaystyle\phi = \frac{\pi}{2}$$.

1. Let n=2 $$\rightarrow$$ ndof = n+1 = 2+1 = 3 with  $$\underline {d} = \left\{d_j;j=0,...,n\right\}_{(n+1)\times1}$$.

2. Find 2 equations that enforce the boundary conditions for
 * {| style="width:100%" border="0"

$$u^h(x) = \sum_{j=0}^n{d_jb_j(x)}$$. (2.9.1)
 * style="width:10%; |
 * style="width:10%; |
 *

 * }

3. Find 1 more equation (i.e. j = 0,1,2) to solve for $$\underline {d} = \left\{d_j\right\}_{3\times1}$$ by projecting the residue, $$\displaystyle P(u^h)$$, on a basis function, $$\displaystyle b_k(x)$$, with k = 0,1,2 such that the additional equation is linearly independent from the equations in part 2.

 * Notes regarding residue:
 * The general form of the residue is defined as $$\displaystyle P(u^h)$$. The exact solution is expressed as $$\displaystyle P(u) = 0$$.

 * $$\displaystyle u^h$$ can be approximated $$\displaystyle u$$. In other words $$\displaystyle u^h \cong u $$. Thus, $$ P(u^h) \ne 0 \quad \forall x \in \Omega $$ (for all values of x in the domain).
 * Notes regarding projection:
 * $$\displaystyle\int_{\Omega } b_i(x) P\left(u^h(x)\right)dx = 0 \quad\Rightarrow\quad\int_0^1 b_k(x) P(u^h)dx = 0$$
 * $$\displaystyle\underline b_i \cdot \underline P(\underline v) = 0 \quad\Rightarrow\quad \underline b_i \cdot \underline P(\underline v) \ = \  <\underline b_i,\underline P(\underline v)>$$

 * Combining the previous two equations yields
 * {| style="width:100%" border="0"

$$\displaystyle <b_k,P(u^h)> = \int_0^1 b_k(x) P(u^h)dx$$. (2.9.2) 4. Display 3 equations in matrix form, $$\underline K \cdot \underline d = \underline F$$.
 * style="width:10%; |
 * style="width:10%; |
 *

 * }

5. Solve for $$\underline d$$.

6. Construct $$\displaystyle u_n^h(x)$$ and plot versus the exact solution, $$\displaystyle u(x)$$.

7. Repeat steps 1 through 6 for:
 * n = 4
 * n = 6

Given
The data set for the general 1-D model with "simple" boundary conditions (G1DM1.0/D2) is given in Vu-Quoc, lecture 12, page 1.

 * $$\displaystyle \Omega = ]{0,1}[$$

 * $$\displaystyle a_2=2$$

 * $$\displaystyle f=3$$

Static case since $$\displaystyle \frac{\partial^su}{\partial t^s}(x,t)=0$$.

The natural (eq 2.9.3) and essential (ed 2.9.4) boundary conditions are defined as

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

$$-\frac{d{u}^{h}}{dx}(0)=4$$ (2.9.3)
 * style="width:10%; |
 * style="width:10%; |
 *

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

$$\displaystyle u(1)=0$$ (2.9.4)
 * style="width:10%; |
 * style="width:10%; |
 *

 * }

Solution
For the case when $$\displaystyle n=2$$

Parts 1 & 2

 * $$\left\{ b_j(x);j=0,1,...,n \right\}$$ when $$\displaystyle b_j(x) = \cos(jx + \phi)$$

 * $$\Rightarrow \quad b_0(x)=\cos\left(\frac{\pi}{4}\right), b_1(x)=\cos\left(x+\frac{\pi}{4}\right),\ and\ b_2(x)=\cos\left(2x+\frac{\pi}{4}\right)$$.

The natural boundary condition can be implemented by differentiating $$\displaystyle u^h(x)$$ with respect to $$\displaystyle x$$.

 * $$\frac{d{u}^{h}}{dx}(x) = \sum_{j=0}^2{d_jb_j'(x)} \quad \Rightarrow \quad \frac{d{u}^{h}}{dx}(0) = \sum_{j=0}^2{d_jb_j'(0)}=-4$$

Substituting for $$\displaystyle b_j'(0)$$,
 * $$\sum_{j=0}^2{d_jb_j'(0)}=d_0b_0'(0)+d_1b_1'(0)+d_2b_2'(0)=-d_1\sin\left(\frac{\pi}{4}\right)-2d_2\sin\left(\frac{\pi}{4}\right)=-4$$

Simplifying we receive

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

$$ \displaystyle \frac{\sqrt{2}}{2}d_1+\sqrt{2}d_2=4$$ (2.9.5)
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 *

 * }

The corresponding equation when $$\displaystyle\phi = \frac{\pi}{2}$$ is

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

$$ \displaystyle \sin \left(\frac{\pi}{2}\right)(d_1+2d_2)=4 \quad \Rightarrow \quad d_1+2d_2=4$$ (2.9.6)
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 *

 * }

Part 3
Equation 2.9.2 can be used to project the residue onto the basis function. First, the partial differential equation $$\displaystyle P(u^h)$$ is defined.

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

$$ \displaystyle P(u^h) = \frac{\partial }{\partial x}\left[a_2(x)\frac{\partial u}{\partial x}\right]+f(x,t) - \overline {m} (x) \frac{\partial ^s u}{\partial t^s}$$ (2.9.7)
 * style="width:10%; |
 * style="width:10%; |
 *

 * }

Substituting the given conditions into this equation and recalling equation 2.9.1,

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

$$ \displaystyle P(u^h) = \frac{\partial }{\partial x}\left\{ 2 \frac {\partial }{\partial x}\left[d_0 \cos{\left(\phi \right)} + d_1 \cos {\left(x + \phi\right)} + d_2 \cos {\left(2x + \phi\right)} \right] \right\}+3$$ (2.9.8)
 * style="width:10%; |
 * style="width:10%; |
 *

 * }

Differentiating twice with respect to $$\displaystyle x$$ and substituting known values,

 * $$\displaystyle P(u^h) = \frac{\partial }{\partial x}\left[2\left(-d_1 \sin {\left(x + \frac{\pi }{4}\right)} - 2d_2 \sin {\left( 2x + \frac{\pi }{4}\right)} \right) \right]+3$$

 * $$\Rightarrow P(u^h) = 2\left[-d_1 \cos {\left(x + \frac{\pi }{4}\right)} - 4d_2 \cos {\left( 2x + \frac{\pi }{4}\right)} \right] +3$$

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

$$ \displaystyle \Rightarrow P(u^h) = -2d_1 \cos {\left(x + \frac{\pi }{4}\right)} - 8d_2 \cos {\left( 2x + \frac{\pi }{4}\right)} +3$$ (2.9.9)
 * style="width:10%; |
 * style="width:10%; |
 *

 * }

Substituting into 2.9.2 for the generic case of $$\displaystyle \phi$$

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

$$ \displaystyle <b_k,P(u^h)> = \int_0^1 b_k(x) P(u^h)dx = \int_0^1 b_k(x) \left[-2d_1 \cos {\left(x + \phi\right)} - 8d_2 \cos {\left( 2x + \phi \right)} +3 \right]dx$$ (2.9.10)
 * style="width:10%;|
 * style="width:10%;|
 *

 * }

Since the equation is valid for all $$\displaystyle b_k(x), \ b_0(x)=\cos{\left(\phi\right)}$$ is utilized. Equation 2.9.10 was solved symbolically using Mathcad 15.0.

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

$$ \displaystyle \cos{\left(\phi\right)} \int_0^1 \left[-2d_1 \cos {\left(x + \phi\right)} - 8d_2 \cos {\left( 2x + \phi \right)} +3 \right]dx = -2\cos{\left(\phi\right)}d_1 \left[\sin{\left(\phi +1 \right)} - \sin{\left(\phi \right)}\right]-4\cos{\left(\phi\right)}d_2 \left[\sin{\left(\phi +2 \right)} - \sin{\left(\phi \right)}\right]+3\cos{\left(\phi\right)}$$ (2.9.11)
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 *

 * }

Part 4
Although some of the equations above are expressed for an explicit value of $$\displaystyle \phi$$, the matrix form of these equations will be written in the general case.

 * Notes:
 * The first row of the matrix $$\underline K$$ is based on equation 2.9.1 and the essential boundary condition, 2.9.4, when $$\displaystyle x=1$$.

 * The second row of the matrix $$\underline K$$ is from equations 2.9.5 and 2.9.6 (for the general case).

 * The third row of the matrix $$\underline K$$ is from equation 2.9.11.

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

$$ \begin{bmatrix} \cos{\left(\phi\right)} & \cos{\left(1+\phi\right)} & \cos{\left(2+\phi\right)} \\ 0 & \sin{\left(\phi\right)} & 2\sin{\left(\phi\right)} \\ 0 & 2\cos{\left(\phi\right)}\left[\sin{\left(\phi +1 \right)} - \sin{\left(\phi \right)}\right] & 4\cos{\left(\phi\right)}\left[\sin{\left(\phi +2 \right)} - \sin{\left(\phi \right)}\right] \end{bmatrix} \begin{bmatrix} d_0\\ d_1\\ d_2 \end{bmatrix} = \begin{bmatrix} 0\\ 4\\ 3cos(\phi) \end{bmatrix} $$      (2.9.12)
 * style="width:10%; |
 * style="width:10%; |
 *

 * }

Part 5
To solve for the matrix $$\underline d$$, first recognize that $$\underline K \cdot \underline d = \underline F$$ can be rewritten as $$\underline d = \underline K^{-1} \cdot \underline F$$.

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

$$ \begin{bmatrix} d_0\\ d_1\\ d_2 \end{bmatrix} = \begin{bmatrix} \cos{\left(\phi\right)} & \cos{\left(1+\phi\right)} & \cos{\left(2+\phi\right)} \\ 0 & \sin{\left(\phi\right)} & 2\sin{\left(\phi\right)} \\ 0 & 2\cos{\left(\phi\right)}\left[\sin{\left(\phi +1 \right)} - \sin{\left(\phi \right)}\right] & 4\cos{\left(\phi\right)}\left[\sin{\left(\phi +2 \right)} - \sin{\left(\phi \right)}\right] \end{bmatrix}^{-1} \begin{bmatrix} 0\\ 4\\ 3cos(\phi) \end{bmatrix} $$      (2.9.13)
 * style="width:10%; |
 * style="width:10%; |
 *

 * }

The inverted $$\underline K$$ matrix in its general form is much too complicated to include here. Therefore the explicit matrices when $$\displaystyle \phi = \frac{\pi}{4} \quad and \quad \phi = \frac{\pi}{2}$$ are solved using Mathcad 15.0.

For the case when $$\displaystyle \phi = \frac{\pi}{4}$$,

 * $$\underline K^{-1}=

\begin{bmatrix} 1.414 & 0.646 & -0.407 \\ 0 & 0.807 & 1.125 \\ 0 & 0.304 & -0.563 \end{bmatrix} $$

 * Therefore,

 * $$\underline d = \underline K^{-1} \cdot \underline F =

\begin{bmatrix} 1.414 & 0.646 & -0.407 \\ 0 & 0.807 & 1.125 \\ 0 & 0.304 & -0.563 \end{bmatrix} \cdot \begin{bmatrix} 0\\ 4\\ 3cos(\phi) \end{bmatrix} $$

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

$$ \displaystyle \underline {d}_{\frac{\phi}{4}} = \begin{bmatrix} 1.719\\ 5.614\\ 0.022 \end{bmatrix} $$     (2.9.14)
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 *

 * }

For the case when $$\displaystyle \phi = \frac{\pi}{2}$$,

 * $$\underline K^{-1}=

\begin{bmatrix} 1.633 \times 10^{16} & 1.678 \times 10^{16} & 5.394 \times 10^{31} \\ 0 & 1.481 & 8.538 \times 10^{15} \\ 0 & -0.240 & -4.269 \times 10^{15} \end{bmatrix} $$

 * Therefore,

 * $$\underline d = \underline K^{-1} \cdot \underline F =

\begin{bmatrix} 1.633 \times 10^{16} & 1.678 \times 10^{16} & 5.394 \times 10^{31} \\ 0 & 1.481 & 8.538 \times 10^{15} \\ 0 & -0.240 & -4.269 \times 10^{15} \end{bmatrix} \cdot \begin{bmatrix} 0\\ 4\\ 3cos(\phi) \end{bmatrix} $$

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

$$ \displaystyle \underline {d}_{\frac{\phi}{2}} = \begin{bmatrix} 7.702 \times 10^{16}\\ 7.491\\ -1.745 \end{bmatrix} $$     (2.9.15)
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 *

 * }

Part 6
The exact solution, $$\displaystyle u(x)$$, can now be plotted along $$\displaystyle \Omega $$ by substituting equation 2.9.14 into 2.9.1. This is compared to $$\displaystyle u_n^h(x)$$ in the plot below.

Author
Philip Flater

title: User:Eml5526.s11.team7/HW2


text:
User:Eml5526.s11.team04.premchand/HW2

= Problem 2.5 - Proving equivalence =

Problem Statement
Given that

$$\textbf{b}_i.\textbf{P}(\textbf{v})=0 \qquad \left \{ i=1,2...n \right.\left. \right \}$$ .....equation 1

$$\textbf{W}.\textbf{P}(\textbf{v})=0  \qquad \forall \textbf{W}\in \mathbb{R}^{nd}$$......equation 2

such that $$\textbf{W}= \sum \alpha _i\textbf{b}_i$$

Prove

equation 1=equation 2

Solution
Equation 1 can be rewritten as multiple equations

such that

$$\textbf{b}_1.\textbf{P}(\textbf{v})=0$$    .... equation a

$$\textbf{b}_2.\textbf{P}(\textbf{v})=0$$    .... equation b

$$\textbf{b}_3.\textbf{P}(\textbf{v})=0$$    .... equation c

upto

$$\textbf{b}_n.\textbf{P}(\textbf{v})=0$$    .... equation n

Here $$\textbf{b}_1,\textbf{b}_2,\textbf{b}_3..\textbf{b}_n$$ are basis vectors in the given coordinate.Each of the equations a,b,c...n can be considered as particular cases in the same coordinate.

From the given fact that $$\textbf{W}= \sum \alpha _i\textbf{b}_i$$

we can infer $$\textbf{W}= \alpha _1\textbf{b}_1+\alpha _2\textbf{b}_2+\alpha _3\textbf{b}_3+...\alpha _n\textbf{b}_n$$ where $$\alpha _1,\alpha _2,\alpha _3...\alpha _n$$ are components of the vector $$\textbf{W}$$

This implies that $$(\alpha _1\textbf{b}_1+\alpha _2\textbf{b}_2+\alpha _3\textbf{b}_3+...\alpha _n\textbf{b}_n).\textbf{P}(\textbf{v})=0$$

This is simply, another way of writing

$$\textbf{W}.\textbf{P}(\textbf{v})=0$$

Hence the equivalence is proved

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

title: User:Eml5526.s11.team04.premchand/HW2