I am using DSolve
to verify a multitude of definite integrals I have done by hand, and things have gone perfectly until this integral,
$$ \int_0^t \frac{\mathrm{d}t}{c^2 + (t - s)^2}$$
where $c = \cos\phi$ and $s = \sin\phi$. (For simplicity I am using the same symbol $t$ in the dummy as in the upper bound, because there is no potential for ambiguity in my situation.)
If the $\phi$ dependence (of $c$ and $s$) is hidden from Mathematica, all goes well:
int[t] /. First @ DSolve[
List[
int'[t] == 1 / (c^2 + (t - s)^2),
int [0] == 0
], int[t], t
]
$\frac{1}{c} \left( \tan^{-1} \frac{s}{c} - \tan^{-1} \frac{s-t}{c} \right)$
But if the $\phi$ dependence is included, then Mathematica complicates the result unnecessarily, with many half-angle terms:
int[t] /. First @ DSolve[
List[
int'[t] == 1 / (Cos[ϕ]^2 + (t - Sin[ϕ])^2),
int [0] == 0
], int[t], t
]
$\frac{1}{2} \left( -2 \tan^{-1} \cot\frac{\phi}{2} \cdot \sec\phi - \text{...} \right)$
I have been unable to simplify this to the former, even with FullSimplify[#, 0 < ϕ < Pi/2] &
which should rule out the integrand becoming infinite.
Is there a workaround or simplification method which doesn't require hiding the $\phi$ dependence from Mathematica?