# What is the particular solution of the differential equation? :  dy/dx + 1/x = e^y/x  with y(1)=ln2

Sep 17, 2017

$y = \ln \left(\frac{2}{2 - x}\right)$

#### Explanation:

We have:

$\frac{\mathrm{dy}}{\mathrm{dx}} + \frac{1}{x} = {e}^{y} / x$ with $y \left(1\right) = \ln 2$ ..... [A]

This is a First Order non-linear Differential Equation. The ${e}^{y}$ term is problematic, so Let us try a substitution of the form ${e}^{y} = t$ to eliminate the problematic term. Then we have,

${e}^{y} = t \implies y = \ln t \implies \frac{\mathrm{dy}}{\mathrm{dt}} = \frac{1}{t}$

As we are changing variable,m we change the initial conditions accordingly:

When $y = \ln 2 \implies t = 2$

Substituting into the original differential equation [A], we get:

$\therefore \frac{\mathrm{dy}}{\mathrm{dt}} \frac{\mathrm{dt}}{\mathrm{dx}} + \frac{1}{x} = {e}^{y} / x$
$\therefore \frac{1}{t} \frac{\mathrm{dt}}{\mathrm{dx}} + \frac{1}{x} = \frac{t}{x}$
$\therefore \frac{1}{t} \frac{\mathrm{dt}}{\mathrm{dx}} = \frac{t - 1}{x}$
$\therefore \frac{1}{t \left(t - 1\right)} \frac{\mathrm{dt}}{\mathrm{dx}} = \frac{1}{x}$

This has reduced the DE [A] to a First Order Separable equation, so we can "seperate the variables" to get:

$\int \setminus \frac{1}{t \left(t - 1\right)} \setminus \mathrm{dt} = \int \setminus \frac{1}{x} \setminus \mathrm{dx}$ ..... [B]

The LHS integral is trivial, and for the RHS integral we must decompose the integrand into partial fractions:

$\frac{1}{t \left(t - 1\right)} \equiv \frac{A}{t} + \frac{B}{t - 1}$
$\text{ } = \frac{A \left(t - 1\right) + B t}{t \left(t - 1\right)}$

$1 \equiv A \left(t - 1\right) + B t$

We can find the coefficients $A$ and $B$ via direct substitution (in practice we use the Cover Up method).

Put $t = 0 \implies 1 = A \left(- 1\right) + 0 \implies A = - 1$
Put $t = 1 \implies 1 = 0 + B \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \implies B = 1$

Using this result, we can now integrate [B] to get the general solution:

$\int \setminus \frac{1}{t - 1} - \frac{1}{t} \setminus \mathrm{dt} = \int \setminus \frac{1}{x} \setminus \mathrm{dx}$

$\therefore \ln | t - 1 | - \ln | t | = \ln | x | + C$

Using the initial condition $t = 2$ when $x = 1$ we have:

$\therefore \ln 1 - \ln 2 = \ln 1 + C \implies C = - \ln 2$

And so the particular solution:

$\ln | t - 1 | - \ln | t | = \ln | x | - \ln 2$

$\therefore \ln | \frac{t - 1}{t} | = \ln | \frac{x}{2} |$

$\therefore \frac{t - 1}{t} = \frac{x}{2}$

$\therefore 2 t - 2 = t x$

$\therefore t \left(2 - x\right) = 2$
$\therefore t = \frac{2}{2 - x}$

Restoring the substitution, we have:

$y = \ln t$
$\setminus \setminus = \ln \left(\frac{2}{2 - x}\right)$