# Elementary solutions to differential equations

Differential equations rarely have closed-form solutions. Some do, and these are emphasized in textbooks.

For this post we want to look specifically at homogeneous second order linear equations:

y ” + a(x) y‘ + b(x) y = 0.

If the coefficient functions a and b are constant, then the solution can be written down in terms of elementary functions, i.e. functions a first year calculus student would recognize. This would include, for example, polynomials, sines, and cosines, but would not include, the gamma function, Bessel functions, Airy functions, etc.

If the coefficients a and b are not constant, the differential equation usually does not have an elementary solution. In fact, you might wonder if it is ever possible in that case for the differential equation to have an elementary solution. Experience would suggest not.

A paper by Kovacic  thoroughly answers this question. The author gives algorithms for determining whether elementary solutions exist and how to find them if they do exist. The following example comes from that paper.

Consider the equation

y” + ry = 0

where 

r(x) = (4 x6 – 8 x5 + 12 x4 + 4 x3 + 7 x2 – 20 x + 4)/4 x4.

Then

y(x) = x-3/2 (x2 – 1) exp(x2/2 – x – 1/x)

is a solution, which the following Mathematica code verifies by evaluating to 0.

```r[x_] := (4 x^6 - 8 x^5 + 12 x^4 + 4 x^3 + 7 x^2 - 20 x + 4)/(4 x^4)
f[x_] := x^(-3/2) (x^2 - 1) Exp[x^2/2 - x - 1/x]
Simplify[D[f[x], {x, 2}] - r[x] f[x]]
```

## More differential equation posts

 Jerald J. Kovacic. An algorithm for solving second order linear homogeneous differential equations. Journal of Symbolic Computation (1986) 2, 3–43.

 There’s an error in the paper, where the denominator of r is given as 4x rather than 4x4.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9041774,"math_prob":0.9988673,"size":1714,"snap":"2020-45-2020-50","text_gpt3_token_len":486,"char_repetition_ratio":0.11988304,"word_repetition_ratio":0.0,"special_character_ratio":0.3033839,"punctuation_ratio":0.11764706,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99981064,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-30T18:01:01Z\",\"WARC-Record-ID\":\"<urn:uuid:a63fda66-3912-4fad-9ff9-4b5e3320a16d>\",\"Content-Length\":\"38611\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3dc455f5-1fa1-4aa3-80ab-cc5a4d3216df>\",\"WARC-Concurrent-To\":\"<urn:uuid:5496f21f-9d93-42c8-ae6e-fbfc35275205>\",\"WARC-IP-Address\":\"74.208.236.113\",\"WARC-Target-URI\":\"https://www.johndcook.com/blog/2019/03/26/elementary-solutions-to-differential-equations/\",\"WARC-Payload-Digest\":\"sha1:CAR34IRFOVZCAC242DUTLL4LSGNYHBCN\",\"WARC-Block-Digest\":\"sha1:OLGUFLINFIE4MEMRM3XRIBU5K2X45IPY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141216897.58_warc_CC-MAIN-20201130161537-20201130191537-00655.warc.gz\"}"}