ODE with separate variables

Hi all,

here is one ODE I solved now

y' = 1 + y^2


\frac{y'}{1+y^2} = 1

\int \frac{dy}{1+y^2} = \int 1 dx

\arctan y = x + C \leftrightarrow y = \tan (x + C)

x \in (-\frac{\pi}{2} - C, \frac{\pi}{2} - C)

The last line is what I'm unsure about.

Shouldn't it rather be

x \in (-\frac{\pi}{2} - C + k\pi, \frac{\pi}{2} - C + k\pi), k \in \mathbb{Z}

or is it ok as I wrote it originally?

Thank you.


Homework Helper
It depends. Usually you would determine the constant by an initial value, ie, y(x0)=y0, in which case the solution would be valid within whichever region (ie, of width [itex]\pi[/tex]) contains x0. If you're just looking for a completely general form, one that represents every possible solution, then your second form is correct.

The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving