# Differential equation with “backwards product rule”.

If we have the following differential equation, ($$h,f$$ known, $$y$$ unknown):

$$f'(x)y(x) + f(x)y'(x) = h(x)$$

it would be easy, since we could spot the derivative for a product:

$$(f(x)y(x))' = h(x)$$

and conclude

$$y(x) = \frac{1}{f(x)}\left(C + \int h(x) dx\right)$$

But what if we have it the "other way around", like this?

$$f(x)y(x) + f'(x)y'(x) = h(x)$$

If the equation

$$f'(x)y(x) + f(x)y'(x) = h(x) \tag 1$$

is written "the other way around",

$$f(x)y(x) + f'(x)y'(x) = h(x), \tag 2$$

then there is no obvious way to apply the product rule; if we observe, however, that on an interval $$J$$ with

$$f'(x) \ne 0, \; x \in J, \tag 3$$

then we may write (2) in the form

$$y'(x) + \dfrac{f(x)}{f'(x)}y(x) = \dfrac{h(x)}{f'(x)}, \tag 4$$

which is a first-order system with varying coefficients, which has a well-known solution

$$y(x)$$ $$= \exp \left ( -\displaystyle \int_{x_0}^x \dfrac{f(s)}{f'(s)} \; ds \right ) \left (y(x_0) + \exp \left (\displaystyle \int_{x_0}^x \dfrac{f(s)}{f'(s)} \; ds \right) \displaystyle \int_{x_0}^x \exp \left ( -\displaystyle \int_{x_0}^s \dfrac{f(u)}{f'(u)} \; du \right ) \dfrac{h(s)}{f'(s)} \; ds\right ), \tag 5$$

with $$x_0 \in J$$.

The formula (5) may in fact also be applied to (1) if we assume

$$f(x) \ne 0, x \in J, \tag 6$$

and divide (1) by $$f(x)$$:

$$y'(x) + \dfrac{f'(x)}{f(x)} y(x) = \dfrac{h(x)}{f(x)}; \tag 7$$

we obtain a formula which effectively interchanges $$f(x)$$ and $$f'(x)$$ in (5). It appears that the formula

$$\ln f(x) - \ln f(x_0) = \displaystyle \int_{x_0}^x \dfrac{f'(s)}{f(s)} \; ds \tag 8$$

may help further simplify (5) when applied to the case of (7).

Let $$h$$ be an anti-derivative of $$\frac f {f'}$$ Then $$(e^{h}y)'=e^{h}(y'+\frac f {f'} y)=e^{h}\frac 1 {f'} (y'f'+fy)=e^{h}\frac h {f'}$$. Now integrate this.

• Ah so it is an integrating factor or (it was long time ago I did this)? Could you please expand a bit? – mathreadler Dec 10 '18 at 7:50
• The DE is of the form $y'+\phi y=\psi$ and it solved by multiplying the equation by the integrating factor $e^{\int \phi}$. – Kavi Rama Murthy Dec 10 '18 at 7:52