The solution of
can be written in the form
If is a positive integer smaller than , find , and .
Identify the equation type and build the integrating factor. The equation is first-order linear in standard form with and . The integrating factor is
The whole point of is that multiplying by it makes the left side an exact derivative.
Multiply through and recognise the product rule.
The left side is exactly — this is the check that the integrating factor was computed correctly. So
Integrate both sides once.
and dividing by ,
Rearrange into the requested shape. Moving to the left,
Comparing with term by term forces , , . The constraint " is a positive integer less than " is what pins the normalisation down: the whole equation could be scaled by any constant, and only (rather than , which would need , ) leaves the coefficient equal to as written.
Verify by substituting back. With we get , so
The terms cancel for every , confirming the general solution. Numerically, taking and gives , and .
Need to solve a different problem like this? Open the solver →