Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I am in an introductory undergraduate course on ODEs, currently on the method of variation of constants to solve nonhomogenous equations.

I am noticing that with many of these problems, when solving for constants after plugging in my guessed values for y I end up with enormous expressions, e.g. solving y'' - 4y' + 5y = 2(cos x)e^2x I ended up with the expression:

A(cos x(2e^2x + 4xe^2x + 2e^2x) - sinx(2xe^2x + e^2x) - sin x(2xe^2x + e^2x) + cos(xe^2x)) + B(sin x(4xe^2x + 2e^2x + 2e^2x) + cos x(2xe^2x + e^2x) + cos x(2xe^2x + e^2x) - sin x(xe^2x) - A(cos x(8xe^2x + 4e^2x) - sin x(4xe^2x) - B(sin x(8xe^2x + 4e^2x) + cos x(4xe^2x) - B(sin x(8xe62x + 4e^2x) + cosx(4xe^2x) + 5(Axe^2x)cos x + 5B(xe^2x)sin x = 2(cos x)e^2x

I am not asking for my work to be checked as I ultimately arrived at the correct answer (y = e^2x(c1cos x + c2sin x) + (sinx)xe^2x), but is it entirely normal to obtain expressions this large? Are there methods learned later or in more advanced courses which streamline this process, or is this simply the nature of ODEs (i.e. since we are solving for functions we will inevitably end up with huge expressions)?

I'm only asking to make sure I am not missing something.

Thank you :)

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Method of Variation of Coefficients

Tags:

**Physics Forums | Science Articles, Homework Help, Discussion**