# Differential Equation Intuition - Wolfram Alpha Incorrect?

Consider the differential equation $$f'(x)=\frac{f(x)}{2x} - \sqrt{f(x)}.$$

Per Wolfram Alpha, its solution is $$f(x)=\frac{1}{9}(4x^2-12cx^{5/4}+9c^2 x^{1/2}).$$

From the differential equation, we can see that when $$x$$ and $$f(x)$$ are large, the function has a negative slope. However, we see from the solution that when $$x$$ is large, so is $$f(x)$$, yet the function has a positive slope. What explains this apparent contradiction in intuition?

Here is an example with concrete values. Setting $$c=1$$, $$f(20) = 125$$. From the solution, $$f$$ slopes upwards at $$x=20$$. Yet according to the differential equation, $$f'(20) = 125/40-125^{0.5} = -8$$, which suggests $$f$$ slopes downwards. What explains this disconnect?

Here is an interactive Desmos graph showing these functions and calculations. As you can see, the derivative of $$f$$ as calculated by Desmos is markedly different from the slope given by the differential equation. Is there any chance Wolfram Alpha got this wrong? Or is there some other explanation for the seeming contradiction?

Any feedback or guidance would be greatly appreciated.

• Could you explain more why when $x$ and $f(x)$ are large the slope should be negative? Commented Jul 15, 2021 at 3:16
• @JonatanGarcia, thank you. For instance, setting $c=1$, $f(20) = 125$. From the solution, $f$ slopes upwards at $x=20$. Yet according to the differential equation, $f'(20) = 125/40-125^{0.5} = -8$, which suggests $f$ slopes downwards. Commented Jul 15, 2021 at 3:23
• Well, that means the function is decreasing, the function can be always positive and decreasing, for example $e^{-x}$ is that your question? Commented Jul 15, 2021 at 3:26
• @JonatanGarcia, thank you very much but I am not sure I agree. $f(20)$ is both positive and increasing, yet the derivative according to the diff eq is negative. Commented Jul 15, 2021 at 3:28
• Plot the graph on Desmos or Geogebra, I don't see why the function is in increasing Commented Jul 15, 2021 at 3:44

Ignoring the $$f=0$$ solution, we can rearrange the equation to see that

$$\frac{f'}{\sqrt{f}} = 2(\sqrt{f})' = \frac{1}{2x}\sqrt{f}-1$$

a linear equation in $$\sqrt{f}$$, which we can solve by integrating factor

$$\int\left(\frac{\sqrt{f(x)}}{x^{\frac{1}{4}}}\right)' = \int-\frac{1}{2x^{\frac{1}{4}}} \implies \sqrt{f(x)} = Cx^{\frac{1}{4}}-\frac{2}{3}x$$

However, at this stage, $$C$$ is not allowed to be any real number - it is dependent on the domain of the function. For positive $$x$$ we have that

$$Cx^{\frac{1}{4}}-\frac{2}{3}x\geq 0 \implies C \geq \frac{2}{3}x^{\frac{3}{4}}$$

Your choice of $$C=1$$ was invalid because extending the domain of the function to $$20$$ puts a lower bound on $$C$$ to be

$$C \geq \frac{2}{3}(20)^{\frac{3}{4}} \approx 6.3049$$

Alternatively, once $$C$$ is chosen, it provides an upper bound to the domain of the function, in which case $$C=1$$ puts the maximal extent of the interval of existence to be

$$0 < x \leq \left(\frac{3}{2}C\right)^{\frac{4}{3}} = \left(\frac{3}{2}\right)^{\frac{4}{3}} \approx 1.717$$

You cannot have arbitrarily large $$x$$.