# Solving differential equations using substitution

Solve the differential equation by making an appropriate substitution

$$x^2dy=(xy+x^2e^\frac{y}{x})$$

Here was my first attempt:

Let y=ux, dy=udx+xdu

$$x^2(udx+xdu)=(ux^2+x^2e^\frac{ux}{x})dx$$
$$x^2(udx+xdu)=(ux^2+x^2e^u)dx$$

$$x^2udx+x^3du=x^2udx+x^2dx+e^udx$$

$$x^3du=x^2dx+e^udx$$

And after that I got stuck.
My teacher said to pick the differential that would be the easiest to integrate and find the substitutions for that. So naturally that would be the dy differential.

So then I did it the other way:

Let x=vy, dx=vdy+ydu

$$v^2y^2dy=(y^2v+y^2v^2e^2\frac{y}{vy})(vdy+ydu)$$

$$vy^2(vdy)=vy^2(1+ve^\frac{1}{v})(vdy+ydu)$$

$$vdy=vdy+v^2e^\frac{1}{v}dy+ydv+yve^\frac{1}{v}dv$$

$$-v^2e^\frac{1}{v}dy=ydv+yve^\frac{1}{v}dv$$

$$-v^2e^\frac{1}{v}dy=y(1+ve^\frac{1}{v})dv$$

$$\frac{1}{y}dy=(\frac{1+ve^\frac{1}{v}}{-v^2e^\frac{1}{v}})dv$$

Integrating this gives me the following result:

$$ln|y|=-ln|v|-\frac{1}{e^\frac{1}{v}}$$

substituting $$\frac{x}{y}$$ back in for v we get

$$ln|y|=-ln|\frac{x}{y}|-\frac{1}{e^\frac{1}{v}}$$

Last edited:

Related Calculus and Beyond Homework Help News on Phys.org
$$x^2dy=(xy+x^2e^\frac{y}{x})$$
$$x^2 \frac{dy}{dx} =(xy+x^2 e^\frac{y}{x})$$
$$y = \frac{y}{x} + e^{\frac{y}{x}}$$