Let $x(t)$ be a solution for the ODE $x'(t) = (2x(t)+t+1)^2$ such that $x(3)=0$ and defined on the maximum possible interval $(t_1,t_2)$. In the question I was asked to find $t_1,t_2$ and give an explicit formula for $x(t)$.
So I used the next method:
defining: $y(t)=(2x+t+1)⇒y^′ (t)=2y(t)^2+1$. This ODE doesn't have a singularity point ($y'(t)=0$) and $y'(t)$ is strictly increasing. Therefore we conclude that a solution $y(t)$ approaches $\infty$ when $t\rightarrow t_2$ ,and $-\infty$ when $t\rightarrow t_1$
Using the opposite derivative we get: $$t(y) = 3+\int_{4}^{y(t)} \frac{1}{2s^2+1} ds = 3+\frac{\arctan(\sqrt{2}y)}{\sqrt2} - \frac{\arctan(\sqrt{2}4)}{\sqrt2}$$ for convenience we get $t(y) = \frac{\arctan(\sqrt{2}y)}{\sqrt2} + c$
Now $t_2 = 3+\int_{4}^{\infty} \frac{1}{2s^2+1} ds = a_2 <\infty$ and $t_1 = 3+\int_{4}^{-\infty} \frac{1}{2s^2+1} ds = a_1 <\infty$ so $t_1,t_2$ are finite.
So we conclude that $x(t) = \frac{y(t)-t-1}{2}$ so $x(t)$ is defined for the same $t_1, t_2$ , and $\lim_{t\rightarrow t_2}x(t) = \lim_{t\rightarrow t_2}y(t) =\infty$ and $\lim_{t\rightarrow t_1}x(t) = \lim_{t\rightarrow t_1}y(t) =-\infty$
So far so good, Now when trying to extract an explicit formula for $x(t)$ I come across the next problem:
extracting $y(t)$: $t(y) = \frac{\arctan(\sqrt{2}y)}{\sqrt2} + c \Rightarrow (t-c)\cdot \sqrt{2} = \arctan(\sqrt{2}y)$ I think the next step is the problematic one $\frac{\tan((t-c)\cdot \sqrt{2})}{\sqrt{2}} = y$
But now $\lim_{t \rightarrow t_2} y(t) =\lim_{t \rightarrow t_2} \frac{\tan((t-c)\cdot \sqrt{2})}{\sqrt{2}} \neq\infty $ and the same way for $t\rightarrow t_1$.
I think the problem comes from the fact that $\tan$ is not one-to-one function, but I don't fully understand why, and how to fix it in order to get an expression of $y(t)$.
You should get $t_2=3+\frac1{\sqrt2}(\frac\pi2-\arctan(4\sqrt2))=c+\frac{\pi}{2\sqrt2}$ so that $\sqrt2(t_2-c)=\frac\pi2$ is one of the poles of the tangent function. Similarly you should have got $t_1=c-\frac{\pi}{2\sqrt2}$ so that $\sqrt2(t_1-c)=-\frac\pi2$ is the other pole of the tangent, so that indeed $t_1<3<t_2$ are the limits of the maximal interval with poles at the boundary points.