Showing posts with label calculus. Show all posts
Showing posts with label calculus. Show all posts

Tuesday, February 9, 2016

Triple integral

Question:
Evaluate
$\iiint_D x\sqrt{1+x^2+y^2+z^2}dxdydz$
The domain is $D=\{(x,y,z) | x\geqq 0, y\geqq 0, x^2+y^2+z^2\leqq 1 \}$.

Answer:
Use the polar coordinate.
\begin{eqnarray*}
x &=& r\sin\theta \cos\phi \\
y &=& r\sin\theta \sin\phi  \\
z &=& r\cos\theta
\end{eqnarray*}
Then, the Jacobian becomes $J=r^2\sin\theta$. Now substitute them into the original integral.
\begin{eqnarray}
I &=& \iiint_D x\sqrt{1+x^2+y^2+z^2}dxdydz   \\
 &=&  {\scriptstyle \iiint_D r^3\sin^2\theta \cos\phi\sqrt{1+(r\sin\theta \cos\phi)^2+(r\sin\theta \sin\phi)^2+(r\cos\theta)^2}dr d\theta d\phi  }      \\
 &=& {\scriptstyle \iiint_D r^3\sin^2\theta \cos\phi\sqrt{1+r^2\sin^2\theta(\cos^2\phi + \sin^2\phi)+r^2\cos^2\theta}dr d\theta d\phi  }      \\
  &=& \iiint_D r^3\sin^2\theta \cos\phi\sqrt{1+r^2\sin^2\theta+r^2\cos^2\theta}dr d\theta d\phi   \\
  &=& \iiint_D r^3\sin^2\theta \cos\phi\sqrt{1+r^2}dr d\theta d\phi   \\
  &=& \int^1_0 r^3\sqrt{1+r^2}dr \int^{\pi}_0 \sin^2\theta d\theta \int^{\pi/2}_0\cos\phi  d\phi   \\
\end{eqnarray}
The domain, $D$, explains that $0\leqq r \leqq 1$, $0\leqq \theta \leqq \pi$, and $0\leqq \phi \leqq \pi/2$. Let us calculate each part of the integral.
\begin{eqnarray*}
I_1 &=& \int^1_0 r^3\sqrt{1+r^2} dr  \\
      &=& \int^2_1 (t-1)\sqrt{t} dt \quad {\scriptstyle (\mathtt{Replaced \ with} \ 1+r^2=t.)}  \\
      &=& \frac{1}{2}\left[\frac{2}{5}t^{5/2}-\frac{2}{3}t^{3/2}\right]^2_1  \\
      &=& \frac{2}{15}(\sqrt{2}+1)  \\
I_2 &=& \int^{\pi}_0 \sin^2\theta d\theta   \\
      &=& \int^{\pi}_0 \frac{1-\cos 2\theta}{2} d\theta   \\
      &=& \int^{\pi}_0 \frac{1}{2}-\frac{\cos 2\theta}{2} d\theta   \\
      &=& \left[ \frac{\theta}{2}-\frac{\sin 2\theta}{4} \right]^{\pi}_0    \\
      &=& \frac{\pi}{2}   \\
I_3 &=& \int^{\pi/2}_0 \cos\phi d\phi   \\
      &=& \left[ \sin\phi \right]^{\pi/2}_0   \\
      &=& 1
\end{eqnarray*}
Therefore,
\[
I = I_1\cdot I_2\cdot I_3 = \frac{2}{15}(\sqrt{2}+1)\cdot \frac{\pi}{2} \cdot 1 = \frac{\pi}{15}(\sqrt{2}+1)
\]

Powered by Hirophysics.com

Thursday, February 4, 2016

Parameter representation of derivatives

Question:
$x$ and $y$ are given as follows:
\begin{eqnarray*}
x &=& e^t \cos t  \\
y &=& e^t \sin t
\end{eqnarray*}
Express $\frac{d^2y}{dx^2}$ in terms of $t$.

Answer:
Take the derivative with respect to $t$.
\begin{eqnarray*}
\frac{dx}{dt} &=& e^t (\cos t -\sin t)  \\
\frac{dy}{dt} &=& e^t (\cos t +\sin t)
\end{eqnarray*}
Therefore,
\[ \frac{dy}{dx} = \frac{\left(\frac{dy}{dt}\right)}{\left(\frac{dx}{dt}\right)}
              = \frac{\cos t + \sin t}{\cos t - \sin t}\]
Now, $\frac{d^2y}{dx^2}$ is a little tricky.
\[ \frac{d^2y}{dx^2} = \frac{d}{dx}\frac{dy}{dx} = \frac{d}{dt}\frac{dy}{dx}\frac{dt}{dx} \]
Therefore,
\begin{eqnarray*}
\frac{d^2y}{dx^2} &=& \frac{d}{dt}\left(\frac{\cos t + \sin t}{\cos t - \sin t}\right)\frac{1}{e^t (\cos t -\sin t)}  \\
                                &=& \frac{(-\sin t + \cos t)(\cos t - \sin t)-(\cos t + \sin t)(-\sin t - \cos t)}{e^t(\cos t - \sin t)^3}  \\
                                &=& \frac{\cos^2 t - 2\cos t\sin t + \sin^2 t + \cos^2 t + 2\cos t\sin t + \sin^2 t}{e^t(\cos t - \sin t)^3}  \\
                                &=& \frac{2(\cos^2 t + \sin^2 t)}{e^t(\cos t - \sin t)^3}    \\
                                &=& \frac{2}{e^t(\cos t - \sin t)^3}  
\end{eqnarray*}

Powered by Hirophysics.com

Tuesday, February 2, 2016

Extreme value 1

Question:
If the following equation holds,
\[ \lim_{x \rightarrow 2}\frac{\sqrt{9+ax}+b}{x-2}=-2 \]
Find $a$ and $b$.

Answer:
Since the extreme value of the denominator becomes zero ($\lim_{x\rightarrow 2}(x-2)=0$), the numerator must also be zero.
\[ \lim_{x \rightarrow 2}(\sqrt{9+ax}+b)=\sqrt{9+2a}+b=0    \\
  \rightarrow  b = -\sqrt{9+2a}   \]
Then, plug $b$ into the original equation and rationalize the numerator and denominator.
\begin{eqnarray*}
 \lim_{x \rightarrow 2}\frac{\sqrt{9+ax}-\sqrt{9+2a}}{x-2}
    &=& \lim_{x \rightarrow 2}\frac{\sqrt{9+ax}-\sqrt{9+2a}}{x-2}\times \frac{\sqrt{9+ax}+\sqrt{9+2a}}{\sqrt{9+ax}+\sqrt{9+2a}}  \\
    &=& \lim_{x \rightarrow 2}\frac{(9+ax)-(9+2a)}{(x-2)(\sqrt{9+ax}+\sqrt{9+2a})} \\
    &=& \lim_{x \rightarrow 2}\frac{a(x-2)}{(x-2)(\sqrt{9+ax}+\sqrt{9+2a})} \\
    &=& \frac{a}{2\sqrt{9+2a}}
\end{eqnarray*}
Now, this result is equal to $-2$. Thus,
\[ \frac{a}{2\sqrt{9+2a}} = -2 \\
   \rightarrow a = -4\sqrt{9+2a} \\
   \rightarrow a^2 = 16(9+2a)  \\
   \rightarrow a^2-32a-144 = (a-36)(a+4)=0  \]
The extreme value $a = -4\sqrt{9+2a}$ obtained above indicates that $a<0$. Therefore, $a=-4$. We know $b = -\sqrt{9+2a}$, so $b=-1$.


Powered by Hirophysics.com

Wednesday, January 27, 2016

Simultaneous ordinary differential equation 1

Question:
Solve for the following simultaneous differential equations:
\[ \left\{ \begin{array}{ll}
           \frac{dx}{dt}+ay = e^{bt}  & (1)\\
           \frac{dy}{dt}-ax = 0  & (2)
          \end{array}
   \right.   \]
where $a$ and $b$ are real numbers.

Answer:
Take differentiation of equation (1).
\[ x'' + ay' = be^{bt} \]
Use (2).
\[ x'' + a^2x = be^{bt} \]
The general solution of this is given when right hand side is equal to zero.
\[ x'' + a^2x = 0 \]
Thus,
\[ x(t) = C_1\cos at + C_2\sin at \]
To solve for the particular solution, due to the expression of right hand side, we can assume that it is $x=Ae^{bt}$. Then, substitute it into the above equation:
\[ (Ae^{bt})'' + a^2(Ae^{bt})' = Ab^2e^{bt} + Aa^2e^{bt} = (a^2 + b^2)Ae^{bt} \]
This must be equal to $be^{bt}$, so
\[ A = \frac{b}{a^2 + b^2} \]
The particular solution becomes $\frac{b}{a^2 + b^2}e^{bt}$. Therefore,
\[ x(t) = C_1\cos at + C_2\sin at + \frac{b}{a^2 + b^2}e^{bt}\]
Plug this solution into (1) to obtain the solution of $y(t)$.
\[ (C_1\cos at + C_2\sin at + \frac{b}{a^2 + b^2}e^{bt})'+ay=e^{bt}  \\
   -C_1a\sin at + C_2a\cos at + \frac{b^2}{a^2 + b^2}e^{bt} + ay = e^{bt} \\
  ay = C_1a\sin at - C_2a\cos at - \frac{b^2}{a^2 + b^2}e^{bt} + e^{bt}
\]
The total solution of $y$ becomes
\[  y(t) = C_1\sin at - C_2\cos at + \frac{a}{a^2 + b^2}e^{bt} \]

Powered by Hirophysics.com

Tuesday, January 26, 2016

Integral using Beta and Gamma functions

Question:
Find the value of
\[ \int^{\infty}_{-\infty}\frac{dx}{x^6+1} \]

Answer:
We can reduce the above integral into
\[ \int^{\infty}_{-\infty}\frac{dx}{x^6+1} = 2\int^{\infty}_{0}\frac{dx}{x^6+1} \]
Replace $x$ with $t^{\frac{1}{6}}$. Then, we have $dx=\frac{1}{6}t^{-\frac{5}{6}}dt$. Thus,
\[ \int^{\infty}_{0}\frac{dx}{x^6+1} = \frac{1}{6}\int^{\infty}_{0}\frac{t^{-\frac{5}{6}}}{t+1}dt \]
Remember that the Beta function is defined as follows:
\[ B(p,q) = \int^{\infty}_{0}\frac{x^{p-1}}{(1+x)^{p+q}}dx \\
B(p,q)=B(q,p)=\frac{\Gamma(p)\Gamma(q)}{\Gamma(p+q)} \]
Therefore, the above expression becomes
\[ \frac{1}{6}\int^{\infty}_{0}\frac{t^{-\frac{5}{6}}}{t+1}dt = \frac{1}{6}B(\frac{1}{6},\frac{5}{6}) \\
   = \frac{1}{6}\frac{\Gamma(\frac{1}{6})\Gamma(\frac{5}{6})}{\Gamma(\frac{1}{6}+\frac{5}{6})} \\
   =  \frac{1}{6}\Gamma(\frac{1}{6})\Gamma(\frac{5}{6})  \]
since $\Gamma(1)=1$.
Recall the following formula:
\[ \Gamma(s)\Gamma(1-s) = \frac{\pi}{\sin\pi s}  \]
The parameter satisfies 0<s<1.
Therefore,
\[ \frac{1}{6}\Gamma(\frac{1}{6})\Gamma(\frac{5}{6}) = \frac{1}{6}\frac{\pi}{\sin(\pi/6)} = \frac{\pi}{3} \]
Hence,
\[ \int^{\infty}_{-\infty}\frac{dx}{x^6+1} = \frac{2\pi}{3}\]

Powered by Hirophysics.com

Monday, January 25, 2016

Differentiation with trigonometric and logarithmic functions

Question:
Here is a function of $x$.
\[ y=\alpha \cos x + 2 - \cos x \log\frac{1+\cos x}{1-\cos x} \]
$\alpha$ is a constant, and the range of $x$ is $0<x<\pi$.
Calculate $\frac{d^2 y}{dx^2}+\frac{\cos x}{\sin x}\frac{dy}{dx}$.

Answer:
Define each term.
\[ y_1 =  \alpha \cos x \\
    y_2 = 2 \\
    y_3 = \log\frac{1+\cos x}{1-\cos x}\]
Calculate each derivative.
\[ y_1' = -\alpha \sin x  \\
  y_2' = 0 \\  \]
The above derivatives are easy, but the third one is a little complicated:
\[  y_3' = (\log|1+\cos x| - \log|1-\cos x|)' \\
         = \frac{(1+\cos x)'}{1+\cos x} - \frac{(1-\cos x)'}{1-\cos x}   \\
         = \frac{-\sin x}{1+\cos x} - \frac{\sin x}{1-\cos x}   \\
        = \frac{-\sin x(1-\cos x) - \sin x(1+\cos x)}{1 - \cos^2x}  \\
        = \frac{-2\sin x}{\sin^2 x}   \\
        = \frac{-2}{\sin x} \]
Since $y=y_1+y_2-\cos x y_3$, the derivative becomes $y'=y_1'+y_2'-[(\cos x)' y_3+\cos x y_3']$. Namely,
\[ \frac{dy}{dx} = -\alpha\sin x + \sin x \log\frac{1+\cos x}{1-\cos x} + \frac{2\cos x}{\sin x}\]
The second derivative is calculated as follows:
\[ \frac{d^2y}{dx^2} = -\alpha\cos x + \cos x \log\frac{1+\cos x}{1-\cos x} + \sin x\frac{-2}{\sin x} + \frac{2((\cos x)'\sin x - \cos x(\sin x)')}{\sin^2x}  \\
           = -\alpha\cos x + \cos x \log\frac{1+\cos x}{1-\cos x} - 2 - \frac{2}{\sin^2x} \]
You can notice that the first three terms of above is equal to $-y$. Therefore,
\[ \frac{d^2y}{dx^2} = -y -\frac{2}{\sin^2 x} \]
The next term becomes
\[ \frac{\cos x}{\sin x}\frac{dy}{dx} = -\alpha\cos x + \cos x\log\frac{1+\cos x}{1-\cos x} + \frac{2\cos^2 x}{\sin^2 x} \]
This can be rewrite as
\[ \frac{\cos x}{\sin x}\frac{dy}{dx} = -y + 2 + \frac{2\cos^2 x}{\sin^2 x} \]
Thus, we have
\[ \frac{d^2 y}{dx^2}+\frac{\cos x}{\sin x}\frac{dy}{dx} = -2y\]

Powered by Hirophysics.com