How can I solve this integral equation by converting it to a differential equation Let we have the following integral equation :$$y(x)=e^{-x}cos(x)-\int_{0}^{x}e^{-x+t}cos(x)y(t)dt$$
How can I solve this integral equation by converting it to a differential equation 
 A: Let $g(x)=e^{-x}\cos x$.  Then the integral equation can be written as
$$y(x)=g(x)\left(1-\int_0^x e^{t}y(t)\,dt\right) \tag 1$$
Differentiating both sides of $(1)$ reveals 
$$\begin{align}
y'(x)&=g'(x)\left(1-\int_0^x e^{t}y(t)\,dt\right) -g(x)e^{x}y(x)\\\\
&=\left(\frac{g'(x)}{g(x)}-e^{x}g(x)\right)y(x)
\end{align}$$
provided $g\ne0$.  Therefore, we find that the integral equation is equivalent to the differential equation
$$\bbox[5px,border:2px solid #C0A000]{y'(x)-\left(\frac{g'(x)}{g(x)}-e^{x}g(x)\right)y(x)=0} \tag 2$$
with boundary condition $y(0)=g(0)=1$.
Solving $(2)$ is straightforward and we find 
$$y(x)=e^{\int_0^xh(t)dt}$$
where $h(x)=\frac{g'(x)}{g(x)}-e^{x}g(x)$.  Integration of $h$ yields
$$\begin{align}
\int_0^xh(t)dt&=\int_0^x\left(\frac{g'(t)}{g(t)}-e^{t}g(t)\right)\,dt\\\\
&=\log g(x)-\int_0^xe^{t}g(t)\,dt\\\\
&=\log(e^{-x}\cos x)-\int_0^x \cos (t)\,dt\\\\
&=\log(e^{-x}\cos x)-\sin(x)
\end{align}$$
Putting it all together, we find that 
$$\bbox[5px,border:2px solid #C0A000]{y(x)=e^{-(x+\sin(x))}\cos(x)}$$
A: Given $\displaystyle y(x)=e^{-x}\cos(x)-\cos(x) \cdot \int_{0}^{x}e^{-x+t}y(t)dt...........(1)$
Using Differentitation Under Integral Sign.
Given $\displaystyle \frac{d}{dx}\left(y(x)\right) = \frac{d}{dx}\left[e^{-x}\cdot \cos x\right] - \frac{d}{dx}\left[\cos x \cdot \int_{0}^{x}e^{-x+t} \cdot y(t)dt\right]$
We Get $\displaystyle y'(x) = -e^{-x}\cdot \sin x+\cos x\cdot e^{-x}-\cos x\cdot y(x)+\int_{0}^{x}e^{-x+t}\cdot y(t)dt\cdot \sin x $
Now Put Value of $\int_{0}^{x}e^{-x+t}\cdot y(t)dt$ from $\bf{1^{st}}$ equation.
$\displaystyle y'(x) = -e^{-x}\cdot \sin x+\cos x\cdot e^{-x}-\cos x\cdot  y(x)+\left[\frac{e^{-x}\cdot \cos x-y(x)}{\cos x}\right]\cdot \sin x$
You get an Differential equation
