While finding the particular integral of an ordinary differential equation, should I add constants of integration or not?
Let's consider an example:
I'm trying to solve $\frac{d^2y}{dx^2} + a^2 y= \sec(ax)$
The solution of this differential equation will be the summation of it's complimentary function and particular integral.
The complimentary function will be C.F = $Ae^{iax}+Be^{-iax}$ because the two roots of $(m^2+a^2)=0$ are $m=ia$ and $m=-ia$.
Then I write the particular integral as:
P.I. = $\frac{1}{\mathrm{D}^2+a^2}\sec(ax) = \frac{1}{2i}(\frac{1}{\mathrm{D}-ia}-\frac{1}{\mathrm{D}+ia})\sec(ax)$.
I then denote $\frac{1}{\mathrm{D}-ia}\sec(ax)$ as $u$ and $\frac{1}{\mathrm{D}+ia}\sec(ax)$ as $v$.
Now, $$(D-ia)u=\sec(ax)\implies \frac{du}{dx} - ia u = \sec(ax)\implies \frac{d}{dx}(ue^{-iax}) = e^{-iax}\sec(ax)$$ $$\implies u= e^{iax}(x + i\frac{\log(\cos(ax))}{a} + C_1)$$
$$(D+ia)v=\sec(ax)\implies \frac{dv}{dx} + ia v = \sec(ax)\implies \frac{d}{dx}(ve^{iax}) = e^{iax}\sec(ax)$$ $$\implies v= e^{-iax}(x - i\frac{\log(\cos(ax))}{a} + C_2)$$
Here, I'm not sure whether to include $C_1$ and $C_2$ (constant of integration) or not to.
If I write down the general solution for $y$ (C.F. + P.I.) I get:
$$Ae^{iax}+Be^{-iax} + \frac{1}{2i}\left(e^{iax}(x + i\frac{\log(\cos(ax))}{a} + C_1) - e^{-iax}(x - i\frac{\log(\cos(ax))}{a} + C_2)\right)$$
As we can see the presence or absence of $C_1$ or $C_2$ will change the general solution drastically!
In the textbook I'm studying from "Introductory Concepts in Differential Equations - Daniel A. Murray", while finding the particular integral they never seem to put in the constants at the end after integration.
See, for example (page 73),
They haven't added any constants of integration for those two underlined integrals! I'm not sure why? Aren't they indefinite integrals? Also, if we don't add the constant of integration, the same integral can give different expressions for the anti-derivative, which differ by a constant. That's exactly the problem I ran into in my previous question.
I'm very confused at this point whether to add the constant of integration or not, while finding the particular integral. Daniel Murray's book doesn't even mention the constants of integration anywhere, while solving for the particular integral.