User:Eml5526.s11.team7.snook/HW2

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[log(x)-\frac{1}{2}] $$ (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%" |
 * <p style="text-align:right">
 * }

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}[\int zlog(z)dz-\int log(z)dz] $$ (2.4.17)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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}[\int zlog(z)dz-\int log(z)dz]=\frac{1}{b^2}[\frac{z^2log(z)}{2}-\frac{z^2}{4}-zlog(z)+z] $$ (2.4.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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


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

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

$$\frac{1+bx}{b^2}[\frac{log(1+bx)}{2}+\frac{bxlog(1+bx)}{2}-\frac{1+bx}{4}-log(1+bx)+1] $$ (2.4.19)
 * <p style="text-align:right">
 * }

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)
 * <p style="text-align:right">
 * }

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" |
 * <p style="text-align:right">
 * }

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%" |
 * <p style="text-align:right">
 * }

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)
 * <p style="text-align:right">
 * }

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%" |
 * <p style="text-align:right">
 * }

Rearrangement yields:


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

$$ \displaystyle x=\frac{z-a}{b} $$ (2.4.24)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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%" |
 * <p style="text-align:right">
 * }

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}[\int zlog(z)dz-a\int log(z)dz] $$ (2.4.26)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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}[\int zlog(z)dz-a\int log(z)dz]=\frac{1}{b^2}[\frac{z^2log(z)}{2}-\frac{z^2}{4}-azlog(z)+az] $$ (2.4.27)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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


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

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

$$\frac{a+bx}{4}-alog(a+bx)+a] $$ (2.4.28)
 * <p style="text-align:right">
 * }

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)
 * <p style="text-align:right">
 * }

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" |
 * <p style="text-align:right">
 * }

Given
Find the exact solution of:


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

$$ \displaystyle \frac{d}{dx}[(2+3x)\frac{du}{dx}]+5x=0 $$ (2.4.31)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

With the following boundary conditions:


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

$$ \displaystyle 1: u(1)=4 $$ (2.4.32)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

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

Solution
Rearranging 2.4.31 and integrating:


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

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

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%" |
 * <p style="text-align:right">
 * }

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}[\frac{4log(2+3x)}{3^3}+\frac{x^2}{6}-\frac{2x}{9}+C2] $$ (2.4.36) Where C2 is a constant of integration. Solving the second term now:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


 * {| 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%" |
 * <p style="text-align:right">
 * }

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}[\frac{4log(2+3x)}{3^3}+\frac{x^2}{6}-\frac{2x}{9}] +C1log(2+3x)+C2$$ (2.4.38)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Taking the first derivative of Eq. 2.4.38 gives:


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

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

Using BC2 (Eq. 2.4.33) gives:


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

$$ \displaystyle C1=-4$$ (2.4.40)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Using BC1 (Eq. 2.4.32) gives:


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

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

Giving the Final Equation for u:


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

$$ \displaystyle u=\frac{-5}{2}[\frac{4log(2+3x)}{27}+\frac{x^2}{6}-\frac{2x}{9}] -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}[\frac{4log(5)}{27}+\frac{1}{6}-\frac{2}{9}]+4log(5) $$ (2.4.42)
 * <p style="text-align:right">
 * }

Given
Graph u(x) (Eq. 2.4.42)