First order differential equation solution check.

76 Views Asked by At

I have an equation:

$\frac{dy}{y}=(0.0001x^2+0.005x)dx$

$y=ce^{(0.00003x+0.0025)x^2}$

Now I try to substitute $y$ in the euqation and I am getting

$(\frac{1}{ce^{(0.00003x+0.0025)x^2}})'=0.0001x^2+0.005x$

$(\frac{1}{ce^{(0.00003x+0.0025)x^2}})'=(\frac{1}{c}e^{(-0.00003x-0.0025)x^2})'=(\frac{1}{c}e^{(-0.00003x-0.0025)x^2})(-0.0001x^2-0.005x)$

But

$(\frac{1}{c}e^{(-0.00003x-0.0025)x^2})(-0.0001x^2-0.005x) \neq 0.0001x^2+0.005x$

What am I missing here while checking the solution?

3

There are 3 best solutions below

0
On BEST ANSWER

The equation is of the form:

$$ \frac{\mathrm{d}y}{y} = (ax^2+bx)\mathrm{d}x $$

where $a=0.0001$ and $b=0.005$. Integrating both sides gives:

$$ \int\frac{\mathrm{d}y}{y} = \int(ax^2+bx)\mathrm{d}x $$

The solution is

$$ \ln y = \frac{a}{3}x^3+\frac{b}{2}x^2+c$$

Therefore, in terms of $y$:

$$ y = C\mathrm{e}^{(\frac{a}{3}x+\frac{b}{2})x^2}, \label{eq1} \tag{1}$$

where $C=\mathrm{e}^c$. We can test the solution in the following way:

$$\begin{align} \frac{\mathrm{d}y}{\mathrm{d}x} &= \frac{\mathrm{d}}{\mathrm{d}x}\left [ C\mathrm{e}^{(\frac{a}{3}x+\frac{b}{2})x^2} \right]\\ &=\frac{\mathrm{d}}{\mathrm{d}x}\left [ \frac{a}{3}x^3+\frac{b}{2}x^2 \right]C\mathrm{e}^{(\frac{a}{3}x+\frac{b}{2})x^2} \\ &=\left ( ax^2+bx^2 \right)C\mathrm{e}^{(\frac{a}{3}x+\frac{b}{2})x^2} \end{align}.$$ Using $\eqref{eq1}$: $$ \frac{\mathrm{d}y}{\mathrm{d}x} =\left ( ax^2+bx^2 \right)y $$

Therefore: $$ \frac{\mathrm{d}y}{y} =\left ( ax^2+bx^2 \right) \mathrm{d}x $$

Regarding the numeric values: $a=0.0001=\frac{1}{10000}$, then $\frac{a}{3}=\frac{1}{30000}\neq 0.00003$. On the other hand, $$ \frac{\mathrm{d}y}{y} \neq \frac{1}{y'} $$ The right way to view the equation is the following: The differential of a function $y(x)$ is given by $$ \mathrm{d}y=y'(x)\mathrm{d}x $$ Divide each side of the equation by $y(x)$

$$ \frac{\mathrm{d}y}{y}=\frac{y'(x)}{y}\mathrm{d}x. $$ Then $\frac{y'(x)}{y}$ should give you $0.0001x^2+0.005x$.

0
On

As mentioned in the comments the coefficients should not be rounded-off.

Hint:

$$\frac{\mathrm{d}y}{y}=(0.00009x^2+0.005x)\mathrm{d}x$$

$$\implies \frac{\mathrm{d}y}{y\mathrm{d}x}=(0.00009x^2+0.005x)$$

$$\implies \frac{y'}{y}=(0.00009x^2+0.005x)$$

Now substitute $y$ and $y'$.

Note that:

$$y'=\frac{\mathrm{d}y}{\mathrm{d}x}=ce^{(0.00003x+0.0025)x^2}\cdot (0.00009x^2+0.005x)$$

0
On

You need to use that $$ \frac{y'}{y}=(\ln|y|)' $$ which in your case gives $$ (\ln|ce^{(0.00003x+0.0025)x^2}|)'=(\ln|c|+0.00003x^3+0.0025x^2)'=0.00009x^2+0.005x. $$ which is the right side of your DE within the considered accuracy.


Conversely, $$\left(\frac1y\right)'=-\frac{y'}{y^2}$$ which is not the expression in the original DE.