Powered by MathJax
Showing posts with label integration by parts. Show all posts
Showing posts with label integration by parts. Show all posts

Thursday, January 16, 2014

Question of the week #5 - the answer

Let us come to consider a detailed look at the solution of last week's question:
For the reader's convenience we repeat the statement of the question:
Question of the week #5:
(a). Use integration by parts to show that:
$$
\int sinx \cdot cosx \cdot e^{-sinx} dx = -e^{-sinx} \cdot \big( 1 + sinx \big) + c
$$
Now consider the following differential equation:
$$
\frac{dy}{dx}-y \cdot cosx = sinx \cdot cosx
$$
   (b). Determine the integration factor and find the general solution $y=f(x)$
   (c). Find the special solution satisfying $f(0)=-2$

Solution: (a). Noticing (by applying the chain rule of differentiation) that $\big( e^{-sinx} \big)' = e^{-sinx}(-sinx)' = - cosx \cdot e^{-sinx}$ we can proceed with a straightforward integration by parts:
$$
\begin{array}{c}
\int sinx \cdot cosx \cdot e^{-sinx} dx = -\int sinx \frac{d\big( e^{-sinx} \big)}{dx} dx = \\
     \\
= -\int sinx \big( e^{-sinx} \big)' dx = -sinx \cdot e^{-sinx} + \int e^{-sinx} \cdot cosx dx = \\
    \\
= -sinx \cdot e^{-sinx} - \int \frac{d\big( e^{-sinx} \big)}{dx} dx = -sinx \cdot e^{-sinx} - \int \big( e^{-sinx} \big)' dx = \\
       \\
= -sinx \cdot e^{-sinx} -  e^{-sinx} + c = - e^{-sinx} \big( 1 + sinx \big) + c
\end{array}
$$
(b). The given DE is $y'-y \cdot cosx = sinx \cdot cosx$. So we compute for the integration factor:

  • $-\int cosx dx = -sinx + d$, where $d \in \mathbb{R}$ is a constant of integration. Since we need only one (actually: anyone) of the indefinite integrals -in order to find an integration factor- we can pick $d=0$
  • The integration factor thus reads: $\mu(x) = e^{-sinx}$ 

(c). Multiplying both sides of the DE with the integration factor $\mu$ determined in (b) and using the result of (a) we get:
$$
\begin{array}{c}
e^{-sinx} \cdot y'- e^{-sinx} \cdot y \cdot cosx = e^{-sinx} \cdot sinx \cdot cosx  \Leftrightarrow  \\
     \\
\Leftrightarrow \big( e^{-sinx} \cdot y \big) ' = e^{-sinx} \cdot sinx \cdot cosx   \Leftrightarrow \\
     \\
\Leftrightarrow e^{-sinx} \cdot y  = \int e^{-sinx} \cdot sinx \cdot cosx dx \Leftrightarrow \\
    \\
\Leftrightarrow e^{-sinx} \cdot y = -sinx \cdot e^{-sinx} -  e^{-sinx} + c \Leftrightarrow   \\
     \\
\Leftrightarrow y = -sinx + c \cdot e^{sinx} - 1
\end{array}
$$
Hence, we have determined the general solution of the given DE. It is a family of functions parameterized by $c \in \mathbb{R}$. In order to single out that special solution satisfying $x=0$, $y=2$ we have to simply substitute these values in the expression of the general solution and solve the resulting expression for $c$:
$$
-2 = sin0 + c \cdot e^{sin0} - 1 \Leftrightarrow -2 = c - 1 \Leftrightarrow c = -1
$$
thus, the special solution is
$$
y = -sinx - e^{sinx} - 1
$$ 

Sunday, January 5, 2014

Question of the week #5

This week's post comes from differential equations:
   (a). Use integration by parts to show that:
$$
\int sinx \cdot cosx \cdot e^{-sinx} dx = -e^{-sinx} \cdot \big( 1 + sinx \big) + c
$$
Now consider the following differential equation:
$$
\frac{dy}{dx}-y \cdot cosx = sinx \cdot cosx
$$
   (b). Determine the integration factor and find the general solution $y=f(x)$
   (c). Find the special solution satisfying $f(0)=-2$