The given function is a linear combination of eaxcosbx and eaxsinbx, which are the two independent solutions of the second-order linear ODE with constant coefficients whose characteristic equation has complex roots a±ib. Substituting directly verifies that it satisfies the differential equation identically.
We need to check that y=c1eaxcosbx+c2eaxsinbx satisfies
dx2d2y−2adxdy+(a2+b2)y=0.
The key idea: this is a linear homogeneous ODE with constant coefficients. For such equations, if we can show that both eaxcosbx and eaxsinbx individually satisfy the ODE, then any linear combination (like the given y) will also satisfy it, by linearity. So we can either verify the combination directly, or verify each basis function separately. We'll do the direct substitution — it's cleaner and avoids repeating work.
- First derivative
Differentiate y term by term. For eaxcosbx, use the product rule:
dxd(eaxcosbx)=aeaxcosbx−beaxsinbx.
For eaxsinbx:
dxd(eaxsinbx)=aeaxsinbx+beaxcosbx.
So
dxdy=c1(aeaxcosbx−beaxsinbx)+c2(aeaxsinbx+beaxcosbx).
- Second derivative
Differentiate again. For the c1 part:
dxd(aeaxcosbx−beaxsinbx)=a(aeaxcosbx−beaxsinbx)−b(aeaxsinbx+beaxcosbx).
Simplify:
=(a2−b2)eaxcosbx−2abeaxsinbx.
For the c2 part:
dxd(aeaxsinbx+beaxcosbx)=a(aeaxsinbx+beaxcosbx)+b(aeaxcosbx−beaxsinbx).
Simplify:
=(a2−b2)eaxsinbx+2abeaxcosbx.
Hence
dx2d2y=c1[(a2−b2)eaxcosbx−2abeaxsinbx]+c2[(a2−b2)eaxsinbx+2abeaxcosbx].
- Form the combination
We need to compute:
dx2d2y−2adxdy+(a2+b2)y.
It's efficient to group terms by the two basis functions. Let’s collect coefficients of eaxcosbx and eaxsinbx separately.
Coefficient of eaxcosbx (from all three pieces):
- From dx2d2y: c1(a2−b2)+c2(2ab)
- From −2adxdy: −2a[c1a+c2b] (since dxdy has c1a and c2b multiplying cosbx)
- From (a2+b2)y: (a2+b2)c1
Sum these:
c1(a2−b2)+c2(2ab)−2a(c1a+c2b)+(a2+b2)c1.
Simplify c1 terms: a2−b2−2a2+a2+b2=0.
Simplify c2 terms: 2ab−2ab=0.
So the coefficient of eaxcosbx is 0.
Coefficient of eaxsinbx:
- From dx2d2y: c1(−2ab)+c2(a2−b2)
- From −2adxdy: −2a[−c1b+c2a] (since dxdy has −c1b and c2a multiplying sinbx)
- From (a2+b2)y: (a2+b2)c2
Sum:
−2abc1+c2(a2−b2)−2a(−c1b+c2a)+(a2+b2)c2.
Simplify c1 terms: −2ab+2ab=0.
Simplify c2 terms: a2−b2−2a2+a2+b2=0.
Again zero.
- Conclusion
Both coefficients vanish, so the entire expression equals 0 for all x, regardless of c1 and c2. Hence y is indeed a solution.
This is exactly the general solution of the ODE when the characteristic equation r2−2ar+(a2+b2)=0 has roots r=a±ib. The verification above is essentially checking that these complex exponentials satisfy the ODE — but doing it with real functions avoids complex arithmetic.
A common mistake is to forget the cross terms when differentiating eaxsinbx — the derivative of sinbx gives bcosbx, which contributes to the cos coefficient, and vice versa. Always track both basis functions carefully.
✓Final answer
The given function satisfies the differential equation for all a,b and arbitrary constants c1,c2.