How to treat absolute value in differential equations I have worked through a separable first-order ODE to get the following:
$$
|y|=e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}}
$$
There is an initial value of y(2) = -3
It is easy to then plug this in and find a value for C1.
However, when then presenting the final solution, would I create a new C2 such that:
$$
C_{2}=\pm C_{1}
$$
Or leave it in as is, and sub in C the value of C1
Or do the following?
$$
y=\pm e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}}
$$
 A: What you tried to do is the following:
$$
|y| = e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}} \Rightarrow
(y=e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}} \forall x\in \mathbb{R}))\space or \space
(y=-e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}} \forall x \in \mathbb{R}))
$$
The problem here is that if $y$ is not continuous, then the above does not hold, but the following is true:
$$
|y| = e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}} \Rightarrow
(\exists A_1 \subseteq \mathbb{R}: y=e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}}\space\forall x\in A_1)\space and \space
(\exists A_2 \subseteq \mathbb{R}: y=-e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}}\space\forall x\in A_2)
$$
However, if we know that $y$ is continous we can manipulate the equation as follows. We first of all know that $e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}} \neq 0 \Rightarrow |y| \neq 0 \Rightarrow y\neq 0$
From Bolzano's theorem it follows that since $y$ is continuous and not equal to $0$ it has positive or negative sign across the whole domain, but not both. We know that $y(2) = -3$  so we can conclude that $y < 0 \space \forall x\in R$. Hence:
$$y=-e^{\frac{1}{2} \arctan \left(\frac{x}{2}\right)} e^{c_{1}}\space\forall x\in \mathbb{R}$$
From here you can finish the exercise! I hope I helped!
A: Usually, you would solve
$$
\ln|y(x)|=\frac12\arctan(\frac x2)+c_1
$$
as
$$
y(x)=C_1e^{\frac12\arctan(\frac x2)}
$$
where $C_1=\pm e^{c_1}$ also adjusts for the sign of $y(x)$. This form then also contains the case of the zero function as solution with $C_1=0$.
Then compute
$$
C_1=y_0e^{-\frac12\arctan(\frac{x_0}2)}=-3e^{-\frac\pi8}.
$$
