1
$\begingroup$

I'm rusty in ODEs, so this might be simple..

Solve $$f'(x)=f(x)^{2}+4$$

I was able to make a few observations but they don't seem too helpful. First, since $f(x)^{2}+4\geq 4$, we have $f'(x)\geq 4$ everywhere, so in particular $f(x)$ is increasing (this rules out constant functions, for example).

I next considered linear functions. Supposing that $f(x)=ax+b$, then $f'(x)=a$ so by the given condition we must have $$a=(ax+b)^{2}+4$$ for all $x$. In particular, setting $x=1$ gives $$a=(a+b)^{2}+4$$ and setting $x=-1$ gives $$a=(a-b)^{2}+4$$ In particular this means $a+b=a-b$ so that $b=0$. In this case setting $x=0$ gives $a=4$ so our function would have to be $f(x)=4x$, but this clearly does not satisfy the desired condition. Therefore we can rule out linear functions.

I feel like I'm approaching this the wrong way because I'm only ruling out specific classes of functions, rather than proving any properties that $f$ must have.

Motivation: I am preparing for technical interviews and found this problem here.

$\endgroup$
7
$\begingroup$

Your DE is $y'=y^2+4$, which is a separable equation, meaning we can "move" all the $y$ terms to one side and the $x$ terms on the other, as follows: $$\frac{dy}{dx}=y^2+4 \implies \frac{1}{y^2+4}dy = dx$$ Integrating yields $$\int \frac{1}{y^2+4}dy = \int 1dx \implies \frac 12 \arctan(\frac y2)=x+C$$ and so you can solve for $y$: $$y=2\tan(2x+C)$$

$\endgroup$
  • 1
    $\begingroup$ Great, thanks! I definitely remember seeing this method but haven't had to use it in 10 years or so :) $\endgroup$ – pwerth Mar 4 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.