# 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 \(\displaystyle \frac{dy}{dx}=g(y)\) is very similar to the method of \(\displaystyle \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 dy/dx=g(y)

Let's look at some examples:

## Example Question 1

## 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, then integrate both sides to find a general solution.Multiply both sides by \({dx}\) and divide by \(y^{2}\). This 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}=x+c\] and by rearranging we get \[y=-\frac{1}{x+c}\]

## Example Question 2

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

Again this is separable, so we can do the same as the previous example, by multiplying both sides by \({dx}\) and dividing both sides by \({y^2+2}\) and we get: \[\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(\sqrt2(x+c))\]

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

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