I am a physics undergraduate working through of Jackson E&M (3ed)'s section on solving Laplace's equation in cylindrical coordinates. I am consciously asking this question on Math stack. I have taken Linear Algebra. I haven't taken a formal course in ODE or PDE.
Jackson solves Laplace's equation by the usual separation of variables method, i.e., assuming:
$$\Phi(\rho, \phi, z)=R(\rho)Q(\phi)Z(z).$$
The axial differential equation with the constant set to $-k^2$ (as opposed to $k^2$) is:
$$ \frac{d^2Z}{dz^2}+k^2Z=0. $$
The most general solution to this differential equation (to my understanding) is:
$$Ae^{ikz} + Be^{-ikz}.$$
Where A and B are arbitrary constants. To me, this most general solution represents a space of solutions. Is a subset of this space of solutions:
$$C\text{sin}kz+D\text{cos}kz.$$
And are these more particular solutions given by restricting the type of values the constants $A$ and $B$ can take on?
Is how I am understanding "what the most general solution is" accurate? Is there a better or more rigorous way to look at it?
It would be nice if you clarify a field, from which constants $A$, $B$, $C$ and $D$ are taken. But the solution $Ae^{ikz} + Be^{ikz}$ is a general solution, and moreover represents the space of solutions because it is a linear combination of basis vector-solutions $e^{\pm ikz}$ (all solutions of pendulum equation could be represented in this form).
Furthermore, as \begin{align} e^{ikz} &= \cos(kz) + i\sin(kz), & e^{-ikz} &= \cos(kz) - i\sin(kz), \end{align} then \begin{equation} Ae^{ikz} + Be^{-ikz} = (A + B)\cos(kz) + i(A - B)\sin(kz). \end{equation} Now denoting $A + B = C$ and $iA - iB = D$, we obtain, in fact, \begin{equation} Ae^{ikz} + Be^{-ikz} = C\cos(kz) + D\sin(kz). \end{equation} These solutions are same as long as $A,B,C,D\in\mathbb{C}$.
Note that something like $Ae^{ikz}$, $D\sin(kz)$, $A\cos(kz) + (1 - A)\sin(kz)$ (with $A,D\in\mathbb{C}$) are a subspaces of the whole space of solutions, as these spans are generated only by one parameter (not two).