Find the general solution for: $x\frac{dy}{dx}=\sqrt{4-y^2}$

calculusordinary differential equations

Find the general solution for: $$x\frac{dy}{dx}=\sqrt{4-y^2}$$

I solved this to get: $$y=2\sin(\ln|x|)$$

But when I graph the function: $$f(x)=2\sin(\ln|x|)$$

and its slope function: $$\frac{dy}{dx}(x)=\frac{\sqrt{4-(2\sin(\ln|x|))^2}}{x}$$

something doesn't match up. The function $f(x)$ has negative slopes at certain locations but the slope function has no negative values. The slope function seems to be the absolute value function of the slope function. Have I made an error somewhere?

Best Answer

$\arcsin \frac y2 = \ln |x| + C$

$C$ needs to be suitable for your initial conditions, such that $-\pi <\ln |x| + C <\pi$

And over some range of $x, y(x)$ is valid.

And when $-\pi <\ln |x| + C <\pi$ moves out of this range, something going to break.

If x crosses $0$ something bad is going to happen, and for some $x, y(x)$ will equal $2$ at which point $y$ becomes a constant function.

Related Question