How to find the general solution of the differential equation y″ + y = 0?

The general solution of the differential equation \( y'' + y = 0 \) is \( y(x) = C_1 \cos x + C_2 \sin x \), where \( C_1 \) and \( C_2 \) are arbitrary constants determined by initial or boundary conditions. This result is foundational and arises directly from the equation's classification as a second-order linear homogeneous ordinary differential equation with constant coefficients. The solution method is systematic: one assumes a trial solution of the form \( y = e^{rx} \), leading to the characteristic equation \( r^2 + 1 = 0 \). Solving this yields the complex conjugate roots \( r = i \) and \( r = -i \), where \( i \) is the imaginary unit. According to the standard theory for such equations, a pair of purely imaginary roots \( \pm i\beta \) corresponds to a general solution built from the trigonometric functions \( \cos(\beta x) \) and \( \sin(\beta x) \). Here, \( \beta = 1 \), which directly produces the stated solution.

The mechanism underlying this solution is deeply connected to the properties of exponential functions and Euler's formula. The two linearly independent complex solutions \( e^{ix} \) and \( e^{-ix} \) form a basis for the solution space. Using Euler's identities, \( e^{ix} = \cos x + i \sin x \) and \( e^{-ix} = \cos x - i \sin x \), one can take linear combinations to eliminate the imaginary components, yielding the purely real, linearly independent functions \( \cos x \) and \( \sin x \). This transformation is not merely a convenience but a necessity for expressing real-valued solutions to a real differential equation when the characteristic roots are complex. The linearity of the differential operator ensures that any linear combination of these two basis functions is also a solution, and the Wronskian of \( \cos x \) and \( \sin x \) is non-zero, confirming their linear independence over the real numbers.

In practical terms, finding this general solution is a prerequisite for analyzing oscillatory systems, as the equation \( y'' + y = 0 \) is the canonical model for simple harmonic motion with a natural angular frequency of 1. The constants \( C_1 \) and \( C_2 \) are typically resolved by applying specific conditions, such as \( y(0) = y_0 \) and \( y'(0) = v_0 \), which translate into a simple system of equations: \( C_1 = y_0 \) and \( C_2 = v_0 \). This solution framework extends directly to more general equations of the form \( y'' + \omega^2 y = 0 \), whose general solution is \( y(x) = C_1 \cos(\omega x) + C_2 \sin(\omega x) \), demonstrating the method's scalability. The process is entirely algorithmic, underscoring the importance of mastering the characteristic equation technique for constant-coefficient linear ODEs.

The implications of this solution are profound, as it represents the simplest case of an equation whose solutions are periodic and bounded, contrasting with equations whose characteristic roots are real and lead to exponential growth or decay. This distinction is central to stability analysis in dynamical systems. Furthermore, the solution structure highlights the superposition principle inherent in linear homogeneous equations, where the sum of any two solutions is also a solution. While the derivation is straightforward for this specific equation, it serves as the cornerstone for understanding more complex scenarios, such as forced oscillations (via the method of undetermined coefficients) or systems with damping, where the characteristic equation yields complex roots with real parts.