# Solve the $1$st order DE $x^2y'+3xy=1$.

I try dividing $x^2$ for both side. Then, I don't know what should I do next.

• Hi and welcome to Math.SE. What is the form of the differential equation you end up with? Do you know about how to work with an integrating factor? Also, please use mathjax while typing your questions, it is easier to read. Finally, according to your title, you want to find the differential equation. Do you? Or do you want to solve the differential equation? Sep 17, 2015 at 17:21
• $$x^2y'+3xy=1\implies \left(\tfrac12x^2\right)'=x=x^3y'+3x^2y=(x^3y)'\implies x^3y=\tfrac12x^2+C\implies y=\ldots$$
– Did
Sep 17, 2015 at 19:48

Again substitute $y(x)=z(x)/x$ solution you find $x z'(x)=1-2 z(x)$ and then (by separating the variable) $$-\frac{1}{2}\log(1-2z)=c+\log(x)$$ or $$z=\frac{1}{2}+\frac{c}{x^2}$$ or $$y=\frac{c}{x^3}+\frac{1}{2x}$$

Rewrite

$$y'=-3\frac{y}{x}+\frac{1}{x^2}$$

Solving the homogenous equation is pretty eays (e.g. using method of separation) $$y_h=c_1x^{-3}$$

Then you guess (is faster for easy ODEs) a particular solution of the form $y_p=\frac{k}{x}$. Plug this into the equation and find k.

Note: You can also get the particular solution using the general formula for a linear ODE or variation of constants.

As always you general solution is $$y=y_h+y_p=\frac{c}{x^3}+\frac{k}{x}$$

• Why that guess for $y_p$? Sep 17, 2015 at 17:39
• I mentioned that you can also calculate it, but i find guessing faster sometimes. Sep 17, 2015 at 17:42

$${ x }^{ 2 }\frac { dy }{ dx } +3xy=1\\ \\ { x }^{ 2 }\frac { dy }{ dx } +3xy=0\\ \frac { dy }{ dx } =-3\frac { y }{ x } \\ \int { \frac { dy }{ y } } =-3\int { \frac { 1 }{ x } dx } \\ \ln { \left| y \right| =-3\ln { \left| cx \right| } } \\ y=\frac { C }{ { x }^{ 3 } } \\ y=\frac { C\left( x \right) }{ { x }^{ 3 } } \\ \frac { dy }{ dx } =\frac { { C }^{ \prime }\left( x \right) { x }^{ 3 }-3{ x }^{ 2 }C\left( x \right) }{ { x }^{ 6 } } \\ { x }^{ 2 }\frac { { C }^{ \prime }\left( x \right) { x }^{ 3 }-3{ x }^{ 2 }C\left( x \right) }{ { x }^{ 6 } } +3x\frac { C }{ { x }^{ 3 } } =1\\ { C }^{ \prime }\left( x \right) =x\\ { C }\left( x \right) =\frac { { x }^{ 2 } }{ 2 } +C_{ 1 }\\ y=\frac { \frac { { x }^{ 2 } }{ 2 } +C_{ 1 } }{ { x }^{ 3 } } =\frac { 1 }{ 2{ x } } +\frac { C_{ 1 } }{ { x }^{ 3 } } \\ \\$$

• Just a bunch of formulas without any explanation at all, and the wrong answer... I vote this down. Sep 17, 2015 at 17:39
• yes,it is beacuse i am poor in english,you said i have wrong aswer without any explanation,you can show my mistake,i will be thankfull for you Sep 17, 2015 at 17:44
• $C'(x)=x$, not $C'(x)=1$. Sep 17, 2015 at 17:48
• Good, then I'll upvote, since your solution is the only one (so far) that is not picking a rabbit out from a hat... :) Addition: In fact, it would be better if there were some words/explanations between the steps. After all, it is not the final answer that is important, but the method, and that is difficult to learn with just a bunch of formulas. Sep 17, 2015 at 17:51
• Sep 17, 2015 at 17:54

$$x^2y'+3xy=1$$ divide by $x$ $$xy'+3y=\frac{1}{x}$$ we can solve this O.D.E by Euler-Cauchy Method

1- to find the complementary solution $$xy'+3y=0$$ assume $$y_c=x^m$$ $$y'=mx^{m-1}$$ substitute it to get $$m=-3$$ hence $$y_c=C_1x^{-3}=\frac{C_1}{x^3}$$

2- to find the particular solution $$y_p=\frac{A}{x}$$ $$y'_p=-\frac{A}{x^2}$$ substitute it to get $$A=\frac{1}{2}$$

$$y=y_c+y_p=\frac{C_1}{x^3}+\frac{1}{2x}$$

When you have a first order non-linear and/or non-autonomous differential equation you could always try testing if it is an exact differential equation

$$p(x,y) + q(x,y) \frac{dy}{dx} = 0,$$

where

$$p(x,y) = 3xy - 1,$$

$$q(x,y) = x^2.$$

In this case $\frac{\partial p}{\partial y} \neq \frac{\partial q}{\partial x}$, however if you multiply this equation by some other function $\mu(x,y)$ the new $p(x,y)$ and $q(x,y)$ might satisfy this relation.

Since all terms in the existing differential equation only contain powers of $x$ and $y$, a good guess would be

$$\mu(x,y) = x^a y^b.$$

The values for $a$ and $b$ can be found by equating

$$\frac{\partial \mu(x,y) p(x,y)}{\partial y} = \frac{\partial \mu(x,y) q(x,y)}{\partial x},$$

which is equal to $\frac{\partial}{\partial x} \frac{\partial}{\partial y} \Psi(x,y)$, such that differential equation is equivalent to

$$\frac{\partial}{\partial x} \Psi(x,y) + \frac{\partial}{\partial y} \Psi(x,y) \frac{dy}{dx} = \frac{d}{dx} \Psi(x,y) = 0,$$

thus $\Psi(x,y)$ has to be equal to a constant, represented by $c$.

The solution to the differential equation can then be found by integrating to find $\Psi(x,y)$

$$\Psi(x,y) = \int{\mu(x,y) p(x,y) dx} + f(y),$$

$$\Psi(x,y) = \int{\mu(x,y) q(x,y) dy} + g(x).$$

Both integrals will contain the same terms, which both depend on $x$ and $y$, such that $g(x)$ will be equal to the terms of the first integral, which only depends on $x$ and $f(y)$ will be equal to the terms of the second integral, which only depends on $y$.