# Differential Equations - dy/dx = g(y)

An equation that involves independent variables, dependent variables, derivatives of the dependent variables with respect to independent variables, and constant is called a **differential equation**.

The case of $\frac{dy}{dx}=g(y)$ is very similar to the method of $\frac{dy}{dx}=f(x).$ We will look at some examples in a moment, but in this case we may need a little bit more rearranging and algebra involved.

## Differential Equation of the Form $\frac{dy}{dx}=g(y)$

Let's look at some examples:

If $\frac{dy}{dx}=y^2,$ express $y$ in terms of $x.$

This differential equation is

separable—we can move the $dy$ and $dx$ around and then integrate both sides to find a general solution.Multiply both sides by ${dx}$ and divide by $y^{2},$ which gives us $\frac{dy}{y^2}={dx}.$ Now, taking the integral of both sides, we have $\int\frac{dy}{y^2}=\int{dx},$ which now becomes the following if we integrate: $-\frac{1}{y} + c_1=x + c_2 \quad (c_1,c_2 \in \mathbb{R}),$ and by rearranging we get $y=-\frac{1}{x+c} \quad (c \equiv c_2-c_1).\ _\square$

If $\frac{dy}{dx}=y^2+2,$ express $y$ in terms of $x.$

Again this is separable, so we can do the same as in the previous example, by multiplying both sides by ${dx}$ and dividing by ${y^2+2}:$ $\frac{dy}{y^2+2}={dx}.$ Taking the integral of both sides gives $\int\frac{dy}{y^2+2}=\int{dx},$ which now becomes the following if we integrate: $\dfrac{\sqrt{2}}{2}\arctan{ \left ( \dfrac{\sqrt{2}}{2}y \right ) }=x+c,$ and we can now rearrange to get $y=\sqrt2\tan\big(\sqrt2(x+c)\big).\ _\square$

**Cite as:**Differential Equations - dy/dx = g(y).

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/differential-equations-dydx-gy/