Thread: Solve in two different ways

1. Solve in two different ways

Solve in two different ways $\frac{dy}{dx}=xy^3-xy$.

-------------------------------------------------------------------------

Separable:

$\frac{dy}{dx}=x(y^3-y)$

$\frac{dy}{y^3-y}=xdx$

$\frac{dy}{y(y+1)(y-1)}=xdx$

Let $\frac{1}{y(y+1)(y-1)}=\frac{A}{y}+\frac{B}{y+1}+\frac{C}{y-1}$

$1=A(0+1)(0-1)$

$A=-1$

$1=B(-1)(-1-1)$

$B=\frac{1}{2}$

$1=C(1+1)$

$C=\frac{1}{2}$

$\int \left[\frac{-1}{y}+\frac{1}{2(y+1)}+\frac{1}{2(y-1)}\right]dy=\int xdx$

$-\ln y+\frac{1}{2}\ln (y+1)+\frac{1}{2}\ln (y-1)=\frac{x^2}{2}+C'$

$-2\ln y+\ln (y+1)+\ln (y-1)=x^2+C$, where $C=2C'$.

$\ln \frac{(y+1)(y-1)}{y^2}=x^2+C$

Bernoulli:

$\frac{dy}{dx}+xy=xy^3$

Let $v=y^{-2}$.

$y=v^{-1/2}$

$\frac{dy}{dx}=-\frac{1}{2}v^{-3/2}\frac{dv}{dx}$

$-\frac{1}{2}v^{-3/2}\frac{dv}{dx}+xv^{-1/2}=xv^{-3/2}$

Multiplying throughout by $-2v^{3/2}$,

$\frac{dv}{dx}-2xv=-2x$

The integrating factor is $e^{\int -2xdx}=e^{-x^2}$.

$e^{-x^2}\frac{dv}{dx}-2xe^{-x^2}v=-2xe^{-x^2}$

$\frac{d}{dx}(ve^{-x^2})=-2xe^{-x^2}$

$ve^{-x^2}=e^{-x^2}+C$

$y^{-2}e^{-x^2}=e^{-x^2}+C$

$y^{-2}=Ce^{x^2}+1$

$y=(Ce^{x^2}+1)^{-1/2}$

-------------------------------------------------------------------------

Where have I gone wrong?

2. Re: Solve in two different ways

Originally Posted by alexmahone
Solve in two different ways $\frac{dy}{dx}=xy^3-xy$.

-------------------------------------------------------------------------

Separable:

$\frac{dy}{dx}=x(y^3-y)$

$\frac{dy}{y^3-y}=xdx$

$\frac{dy}{y(y+1)(y-1)}=xdx$

Let $\frac{1}{y(y+1)(y-1)}=\frac{A}{y}+\frac{B}{y+1}+\frac{C}{y-1}$

$1=A(0+1)(0-1)$

$A=-1$

$1=B(-1)(-1-1)$

$B=\frac{1}{2}$

$1=C(1+1)$

$C=\frac{1}{2}$

$\int \left[\frac{-1}{y}+\frac{1}{2(y+1)}+\frac{1}{2(y-1)}\right]dy=\int xdx$

$-\ln y+\frac{1}{2}\ln (y+1)+\frac{1}{2}\ln (y-1)=\frac{x^2}{2}+C'$

$-2\ln y+\ln (y+1)+\ln (y-1)=x^2+C$, where $C=2C'$.

$\ln \frac{(y+1)(y-1)}{y^2}=x^2+C$

Bernoulli:

$\frac{dy}{dx}+xy=xy^3$

Let $v=y^{-2}$.

$y=v^{-1/2}$

$\frac{dy}{dx}=-\frac{1}{2}v^{-3/2}\frac{dv}{dx}$

$-\frac{1}{2}v^{-3/2}\frac{dv}{dx}+xv^{-1/2}=xv^{-3/2}$

Multiplying throughout by $-2v^{3/2}$,

$\frac{dv}{dx}-2xv=-2x$

The integrating factor is $e^{\int -2xdx}=e^{-x^2}$.

$e^{-x^2}\frac{dv}{dx}-2xe^{-x^2}v=-2xe^{-x^2}$

$\frac{d}{dx}(ve^{-x^2})=-2xe^{-x^2}$

$ve^{-x^2}=e^{-x^2}+C$

$y^{-2}e^{-x^2}=e^{-x^2}+C$

$y^{-2}=Ce^{x^2}+1$

$y=(Ce^{x^2}+1)^{-1/2}$

-------------------------------------------------------------------------

Where have I gone wrong?
What makes you think there's something wrong with either of them (except for leaving off the modulus signs in your logarithms)? If you try to write your separable equation as y in terms of x, you should get something that is correct up to an integration constant.

3. Re: Solve in two different ways

Originally Posted by Prove It
What makes you think there's something wrong with either of them (except for leaving off the modulus signs in your logarithms)? If you try to write your separable equation as y in terms of x, you should get something that is correct up to an integration constant.
$\ln \left|\frac{(y+1)(y-1)}{y^2}\right|=x^2+C$

$\frac{(y+1)(y-1)}{y^2}=\pm e^{(x^2+C)}=\pm e^Ce^{x^2}$

$\frac{(y+1)(y-1)}{y^2}=C'e^{x^2}$, where $C'=\pm e^C$

$y^2-1=C'e^{x^2}y^2$

$y^2(1-C'e^{x^2})=1$

$y^2=(1-C'e^{x^2})^{-1}$

$y=(1-C'e^{x^2})^{-1/2}$, where $C'$ is the negative of the constant in the Bernoulli method.