Solve the initial value problem $x'=\frac{1+x}{1-t^2},x(0)=1$ We know $x(t)=-1$ is a solution. Setting that one aside, we have
$$\frac{dx}{1+x}=\frac{dt}{1-t^2} \iff \\ \ \\  \ln|x+1|= -\frac{1}{2}\ln\bigg|\frac{t-1}{t+1}\bigg|+C$$
But $C=\ln 2$ if $x(0)=1$. Hence,
$$\ln|x+1|=\ln\bigg( \sqrt{\frac{4|t+1|}{|t-1|}} \bigg)$$
The log's value has discontinuities and singularities, so I'm not sure whether the next inferential step is warranted:
$$|x+1|=\sqrt{\frac{4|t+1|}{|t-1|}}$$
And even then, how do we move on from there? We could stipulate $x(t)+1\geq 0$:
$$x(t)=\begin{cases}  2\sqrt{\frac{t+1}{t-1}}-1 & t>1 \\ 
??????? & t=1 \\ 2\sqrt{\frac{t+1}{1-t}}-1 & -1\leq t<1 \\ 2\sqrt{\frac{-t-1}{1-t}}-1 & t<-1  \end{cases}$$
Is this what's expected? And what about $|x+1|\leq0$?  
I'm confused because the textbook says that the solution of an equation like $x'=x^2,x(0)=1$, which is $x=1/(1-t)$, is only defined for $(-\infty,0)$. But in theory $x=1/(1-t)$ is defined everywhere except at $t=1$. Do we have to choose the maximal interval such that it contains the value of the restriction AND the solution to the differential equation is continuous, etc. there? 
 A: It may be less confusing if the integration for 
$$\frac{dx}{1+x}=\frac{dt}{1-t^2} $$
is done as follows. With the given initial conditions,
$$\int_1^x\frac{du}{1+u}=\int_0^t\frac{ds}{1-s^2} $$
$$\ln\frac{1+x}{2}=\tanh^{-1}t$$
which yields the solution,
$$x= 2e^{\tanh^{-1}t}-1$$
Note that the domain of $\tanh^{-1}t$ is (-1,1) and the corresponding range for $x$ is (-1,$\infty$). It is clear from above result that there is no need to worry about $t$ outside (-1,1).
Moreover, given that 
$$ \operatorname{tanh^{-1}}t= \frac{1}{2} \ln \left(\frac{1+t}{1-t}\right) $$
The solution can also be expressed as
$$x= 2 \sqrt{\frac{1+t}{1-t}} -1$$
again, with $-1<t<1$.
A: The general rule when asked to solve a differential equation with an initial value $x'(a) = b$ is to find a solution defined on the largest possible interval containing $a$.  What happens outside that interval, beyond any singularities or other funny stuff, is none of your concern.  This is basically what you were saying in your final sentence:

Do we have to choose the maximal interval such that it contains the value of the restriction AND the solution to the differential equation is continuous, etc. there?

Assuming that you mean the initial value where you write ‘the value of the restriction’, and assuming that you mean differentiable $n$ times for a differential equation of order $n$ where you write ‘continuous, etc.’, then that is exactly correct.
So the final answer is only the piece that contains the initial value: $x(t) = 2\sqrt{\frac{1+t}{1-t}}$ for $-1 < t < 1$.  (Don't even bother with $t = -1$, because it's not differentiable there, which already makes it fail to satisfy the differential equation.)
Note that if you tried to write down the most general solution for a function $x$ with the property that $x(0) = 1$ and $x'(t) = \frac{1+x(t)}{1-t^2}$ wherever $x$ is defined, and defined on as large a subset of the real line as possible given those requirements, then you would still need some arbitrary constants.  The general solution would be
$$x(t) = \cases {P_1\sqrt{\frac{t+1}{t-1}} & for $t > 1$, \\ 2\sqrt{\frac{1+t}{1-t}} & for $-1 < t < 1$, \\ P_2\sqrt{\frac{t+1}{t-1}} & for $t < -1$.}$$
(The constants $P$ arise as $\pm\mathrm{e}^C$, where $C$ is as in your derivation; even the constant solution that you ignored is covered using $P = 0$.)  You have to leave $x$ undefined at $1$ and $-1$, because it's impossible to make it differentiable there (or to satsify the given differentiable equation even if it were differentiable there, because of the division*).  That being so, the initial value gives you no information about what happens when $t < 1$ or $t > 1$, so you still need arbitrary constants there.  Rather than ask you to deal with that (which the initial value is supposed to avoid, after all), you're only expected to give the interval that doesn't need these arbitrary constants.
*ETA:  But you could rewrite the equation as $(1-t^2)x'(t) = 1 + x(t)$, and probably should if this were a real-life application, to avoid the issue of division by zero, and so the real reason that the solution is restricted to $(-1,1)$ is that it can't be made differentiable at $-1$ or $1$ with the given initial value.  (Given just the differential equation, only the constant solution $x(t) = -1$ is differentiable at $t = 1$ or $t = -1$, and that would require a different initial value.)
A: We have to pay attention to the interval of existence.
The solution which satisfies the initial condition is 
$$ x=-1+2\sqrt {| \frac {t+1}{t-1}|}$$ 
The interval of existence is $(-1,1)$ which includes $t=0$
