# Solve this

Question:

If $y=e^{x} \cos x$, prove that $\frac{d y}{d x}=\sqrt{2} e^{x} \cos \left(x+\frac{\pi}{4}\right)$

Solution:

Given $y=e^{x} \cos (x)$

On differentiating y with respect to $x$, we get

$\frac{d y}{d x}=\frac{d}{d x}\left(e^{x} \cos x\right)$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{e}^{\mathrm{x}} \times \cos \mathrm{x}\right)$

Recall that (uv)' $=v u^{\prime}+u v^{\prime}$ (product rule)

$\Rightarrow \frac{d y}{d x}=\cos x \frac{d}{d x}\left(e^{x}\right)+e^{x} \frac{d}{d x}(\cos x)$

We know $\frac{d}{d x}\left(e^{x}\right)=e^{x}$ and $\frac{d}{d x}(\cos x)=-\sin x$

$\Rightarrow \frac{d y}{d x}=\cos x\left(e^{x}\right)+e^{x}(-\sin x)$ [chain rule]

$\Rightarrow \frac{d y}{d x}=e^{x} \cos x-e^{x} \sin x$

$\Rightarrow \frac{d y}{d x}=e^{x}(\cos x-\sin x)$

$\Rightarrow \frac{d y}{d x}=e^{x}(\cos x-\sin x) \times \frac{\sqrt{2}}{\sqrt{2}}$

$\Rightarrow \frac{d y}{d x}=\sqrt{2} e^{x}\left(\frac{\cos x-\sin x}{\sqrt{2}}\right)$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\sqrt{2} \mathrm{e}^{\mathrm{x}}\left(\cos \mathrm{x} \times \frac{1}{\sqrt{2}}-\sin \mathrm{x} \times \frac{1}{\sqrt{2}}\right)$

We know $\cos \left(\frac{\pi}{4}\right)=\sin \left(\frac{\pi}{4}\right)=\frac{1}{\sqrt{2}}$

$\Rightarrow \frac{d y}{d x}=\sqrt{2} e^{x}\left(\cos x \cos \frac{\pi}{4}-\sin x \sin \frac{\pi}{4}\right)$

However, $\cos (A) \cos (B)-\sin (A) \sin (B)=\cos (A+B)$

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}}=\sqrt{2} \mathrm{e}^{\mathrm{x}} \cos \left(\mathrm{x}+\frac{\pi}{4}\right)$

Thus, $\frac{d y}{d x}=\sqrt{2} e^{x} \cos \left(x+\frac{\pi}{4}\right)$
The text passage contains a mathematical question that requires proving a derivative, and it also provides a detailed solution to the problem.
single_question_with_answer
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
# Solve this

Question:

If $y=e^{x} \cos x$, prove that $\frac{d y}{d x}=\sqrt{2} e^{x} \cos \left(x+\frac{\pi}{4}\right)$

Solution:

Given $y=e^{x} \cos (x)$

On differentiating y with respect to $x$, we get

$\frac{d y}{d x}=\frac{d}{d x}\left(e^{x} \cos x\right)$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{e}^{\mathrm{x}} \times \cos \mathrm{x}\right)$

Recall that (uv)' $=v u^{\prime}+u v^{\prime}$ (product rule)

$\Rightarrow \frac{d y}{d x}=\cos x \frac{d}{d x}\left(e^{x}\right)+e^{x} \frac{d}{d x}(\cos x)$

We know $\frac{d}{d x}\left(e^{x}\right)=e^{x}$ and $\frac{d}{d x}(\cos x)=-\sin x$

$\Rightarrow \frac{d y}{d x}=\cos x\left(e^{x}\right)+e^{x}(-\sin x)$ [chain rule]

$\Rightarrow \frac{d y}{d x}=e^{x} \cos x-e^{x} \sin x$

$\Rightarrow \frac{d y}{d x}=e^{x}(\cos x-\sin x)$

$\Rightarrow \frac{d y}{d x}=e^{x}(\cos x-\sin x) \times \frac{\sqrt{2}}{\sqrt{2}}$

$\Rightarrow \frac{d y}{d x}=\sqrt{2} e^{x}\left(\frac{\cos x-\sin x}{\sqrt{2}}\right)$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\sqrt{2} \mathrm{e}^{\mathrm{x}}\left(\cos \mathrm{x} \times \frac{1}{\sqrt{2}}-\sin \mathrm{x} \times \frac{1}{\sqrt{2}}\right)$

We know $\cos \left(\frac{\pi}{4}\right)=\sin \left(\frac{\pi}{4}\right)=\frac{1}{\sqrt{2}}$

$\Rightarrow \frac{d y}{d x}=\sqrt{2} e^{x}\left(\cos x \cos \frac{\pi}{4}-\sin x \sin \frac{\pi}{4}\right)$

However, $\cos (A) \cos (B)-\sin (A) \sin (B)=\cos (A+B)$

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}}=\sqrt{2} \mathrm{e}^{\mathrm{x}} \cos \left(\mathrm{x}+\frac{\pi}{4}\right)$

Thus, $\frac{d y}{d x}=\sqrt{2} e^{x} \cos \left(x+\frac{\pi}{4}\right)$
user
The text passage contains a mathematical question that requires proving a derivative, and it also provides a detailed solution to the problem.

TYPE: SINGLE_QUESTION_WITH_ANSWER