General solution 2026-09-29
The general solution of a differential equation is a family containing every solution, usually parameterized by arbitrary constants or initial data. For a forced linear ordinary differential equation, it is the sum of one particular solution and the general homogeneous solution.
Choose a finite trial family of polynomial-exponential or trigonometric functions for a particular solution, substitute it into a constant-coefficient linear equation, and solve for its coefficients. If the forcing exponent is a characteristic root of multiplicity , multiply the ordinary trial by to leave the homogeneous kernel. The method is efficient for forcing families preserved by differentiation.
The characteristic polynomial factors as , so the complementary solution is . Each exponential forcing resonates with a homogeneous mode; the method of undetermined coefficients therefore uses and . Substitution gives the particular solution . Thus
The initial conditions give and . Hence
The factors of in the particular solution are essential: an unmodified exponential trial lies in the kernel of the differential operator.
The integrating factor is , so . Integrating gives the general solution
The particular solution is only defined up to a homogeneous solution. Subtract from it, absorbing that multiple into the arbitrary constant. The same family can then be written
Holding fixed, the quotient tends to , the derivative of with respect to at . Thus the resonant family is . Direct differentiation gives , so it is the full general solution at resonance. This resonant exponential forcing in a first-order equation limit concerns a reparametrized family, not a fixed value of the original divergent constant . The initial condition gives , hence
Let and measure Lionel's fortune in unit stakes. This is gambler's ruin: the fortune moves by with probability and with probability , stopping at or . Let be the expected value of the absorption time starting at . It is finite: from any interior state, a run of wins or losses has a fixed positive probability of absorption within steps, giving a geometric bound on survival over successive blocks. First-step analysis therefore gives
For , the homogeneous solution of the recurrence is , and a particular solution is . Put . Imposing the two endpoint boundary conditions gives the expected duration of biased gambler's ruin
Consequently the expected number of games is
The denominator and numerator have matching signs, so this is positive. As a check its continuous limit at is , the expected duration of symmetric gambler's ruin.
Define the nested integral
The order- equation in the inner expansion is . The preceding result decomposes its forcing into . The particular solutions combine to
For example, follows directly by differentiating the nested integral, so the equation can also be verified without relying on the supplied particular-solution formulas. At zero ; add to impose the left boundary condition. As this gives
The outer expansion in the overlap, derived in the previous section, requires the remaining constant to be . Thus . The logarithmic matching constant is an error-function logarithmic switchback.
The complete answer through order in the inner expansion is
Here , and . This expression is zero at , and its large- expansion agrees with . Together with , it covers both requested regions. The overlap uses , with the usual termwise ordering restrictions when matching higher terms.
If a single continuous approximation is desired, an additive composite expansion is
The apparent logarithmic divergence at cancels: its residual is . The composite therefore extends continuously to the left endpoint and satisfies the right boundary condition to the requested order.