1. differentiating through the integral

The problem is as follows:
Solve for f(x), given

$\displaystyle f(x) = x + \int^{x}_{0}{(x-2t)f(t) dt}$

What I did:
1. Differentiate both sides wrt x, and partially differentiate through the integral.

$\displaystyle f'(x) = 1 + \frac{d}{dx} \int^{x}_{0}{(x-2t)f(t) dt}$
$\displaystyle f'(x) = 1 + \int^{x}_{0}\frac{\partial}{\partial x}{(x-2t)f(t) dt}$
$\displaystyle f'(x) = 1 + (x-2x)f(x) + \int^{x}_{0}{f(t) dt}$
$\displaystyle f'(x) = 1 - xf(x) + \int^{x}_{0}{f(t) dt}$

2. Differentiate both sides wrt x again.
$\displaystyle f''(x) = - xf'(x) - f(x) + \frac{d}{dx}\int^{x}_{0}{f(t) dt}$
$\displaystyle f''(x) = - xf'(x) - f(x) + f(x)$
$\displaystyle f''(x) = - xf'(x)$

This is an ODE, yes, but how would I solve for this? (i.e. is there a less messy way to calculate this other than using series solutions, which I hate with a passion?)

2. Originally Posted by compliant
The problem is as follows:
Solve for f(x), given

$\displaystyle f(x) = x + \int^{x}_{0}{(x-2t)f(t) dt}$

What I did:
1. Differentiate both sides wrt x, and partially differentiate through the integral.

$\displaystyle f'(x) = 1 + \frac{d}{dx} \int^{x}_{0}{(x-2t)f(t) dt}$
$\displaystyle f'(x) = 1 + \int^{x}_{0}\frac{\partial}{\partial x}{(x-2t)f(t) dt}$
$\displaystyle f'(x) = 1 + (x-2x)f(x) + \int^{x}_{0}{f(t) dt}$
$\displaystyle f'(x) = 1 - xf(x) + \int^{x}_{0}{f(t) dt}$

2. Differentiate both sides wrt x again.
$\displaystyle f''(x) = - xf'(x) - f(x) + \frac{d}{dx}\int^{x}_{0}{f(t) dt}$
$\displaystyle f''(x) = - xf'(x) - f(x) + f(x)$
$\displaystyle f''(x) = - xf'(x)$

This is an ODE, yes, but how would I solve for this? (i.e. is there a less messy way to calculate this other than using series solutions, which I hate with a passion?)
Let y = f(x). Then you have

$\displaystyle \frac{d^2 y}{dx^2} = - x \frac{dy}{dx}$.

Substitute $\displaystyle \frac{dy}{dx} = p$ .... (1):

$\displaystyle \frac{dp}{dx} = - x p$ .... (2)

DE (2) is seperable. Solve it for p as a function of x. Then substitute your expression for p into DE (1) and solve for y as a function of x.