nth derivative of e^(x^2)

SLAM: debunk creationism, pseudoscience, and superstitions. Discuss logic and morality.

Moderator: Alyrium Denryle

Post Reply
User avatar
Hawkwings
Sith Devotee
Posts: 3372
Joined: 2005-01-28 09:30pm
Location: USC, LA, CA

nth derivative of e^(x^2)

Post by Hawkwings »

My friend has this math problem... find an equation for the nth derivative of e^(x^2). Here's what I told him.
http://wims.unice.fr/wims/wims.cgi?modu ... unction.en

enter the function, check all 5 derivative checkboxes, watch stuff happen. You can then enter the last equation again and take even more derivatives.

9th derivative of e^(x^2)=
512 x^9 e^(x^2) + 9216 x^7 e^(x^2) + 48384 x^5 e^(x^2) + 80640 x^3 e^(x^2) + 30240 x e^(x^2)

The pattern is definitely there, but I'm not sure how to write it out. For example, the number of terms is n/2+1 for even n, and n/2+0.5 for odd n. The coefficient for the first term is easy, 2^n, but for the others it's trickier. The last one also depends on whether n is even or odd. For every odd n, the previous coefficient is multiplied by 2+4((n-1)/2). I haven't tried working out the middle ones yet.

So yeah, I can see a pattern, I just don't know how to write it out.
So I'm curious now... how would a general equation for this be represented? How would a general equation deal with the changing number of terms in the answer? Better yet, what is the general equation?

(I feel like I should probably know the answer to my first two questions, so I reserve the right to idiocy)
Vendetta wrote:Richard Gatling was a pioneer in US national healthcare. On discovering that most soldiers during the American Civil War were dying of disease rather than gunshots, he turned his mind to, rather than providing better sanitary conditions and medical care for troops, creating a machine to make sure they got shot faster.
User avatar
Kuroneko
Jedi Council Member
Posts: 2469
Joined: 2003-03-13 03:10am
Location: Fréchet space
Contact:

Re: nth derivative of e^(x^2)

Post by Kuroneko »

They satisfy the recurrence relation Pn+1 = 2xPn + 2nPn-1. This does have a closed form, albeit as an ugly summation involving a double factorial and the falling factorial: P2n+1 = 2n+1(2n+1)!!x{ 1 + Sum0<k<n+1[ (-4)k(-n)kx2k/(2k+1)! ] }. So for n = 4, we have 30240x[ 1 + (8/3)x² + (8/5)x4 + (32/105)x6 + (16/945)x8 ]. An even-termed solution is very similar; in general, look up the Hermite polynomials.
"The fool saith in his heart that there is no empty set. But if that were so, then the set of all such sets would be empty, and hence it would be the empty set." -- Wesley Salmon
User avatar
Feil
Jedi Council Member
Posts: 1944
Joined: 2006-05-17 05:05pm
Location: Illinois, USA

Re: nth derivative of e^(x^2)

Post by Feil »

Do the derivative of the first few terms without adding like terms after every step and the pattern should become clear. d/dx(ke^[x2]*x^m) kicks off one term at 2ke^[x2]*x^[m+1] and one term at mke^[x2]*x^[m-1].

The highest term is multiplied by 2^n where n=m+1 times the original constant, which in your case is just 2^n.

2^n*x^n*e^[x2]

The ratio of the m+1 term to the m term is always 2, but the m term has gone away. So the m term was 2^n-1

The ratio of the m-1 term term to the m+1 term is always m/2 which is 2^n-2, but remember that the m-1 term includes k, which is one power of 2 less than the m+1 term, so

2^n*x^n*e^[x2] + 2^n-2*2^n-1*x^n-2*e^[x2]

but that term is added to a term of the same order that was kicked off by the m-2 term, which is the other half of the m term

that term was 2^n-3*2^n-2*x^n-2*e^[x2]

add those together to get

2^n*x^n*e^[x2] + [2^n-2]([2^n-3]+[2^n-1])[x^n-2]*e^[x2]

from there it is easy because every next term follows the same pattern until you hit n=1 where the pattern terminates because the associated m=n-1 term is 0 and 0 times anything is 0 and the derivative of 0 is 0.

I'm sure there is a more elegant way of writing it but I'll leave that to someone else
User avatar
Hawkwings
Sith Devotee
Posts: 3372
Joined: 2005-01-28 09:30pm
Location: USC, LA, CA

Re: nth derivative of e^(x^2)

Post by Hawkwings »

Ahh, I knew this would draw Kuroneko out of hiding... Thanks for the quick response! I can safely say that I certainly did not know the answers to my first two questions, at least not in the way you two are describing it.
Vendetta wrote:Richard Gatling was a pioneer in US national healthcare. On discovering that most soldiers during the American Civil War were dying of disease rather than gunshots, he turned his mind to, rather than providing better sanitary conditions and medical care for troops, creating a machine to make sure they got shot faster.
User avatar
Surlethe
HATES GRADING
Posts: 12267
Joined: 2004-12-29 03:41pm

Re: nth derivative of e^(x^2)

Post by Surlethe »

If you want an exercise, prove the closed form via induction. :wink:
A Government founded upon justice, and recognizing the equal rights of all men; claiming higher authority for existence, or sanction for its laws, that nature, reason, and the regularly ascertained will of the people; steadily refusing to put its sword and purse in the service of any religious creed or family is a standing offense to most of the Governments of the world, and to some narrow and bigoted people among ourselves.
F. Douglass
User avatar
Feil
Jedi Council Member
Posts: 1944
Joined: 2006-05-17 05:05pm
Location: Illinois, USA

Re: nth derivative of e^(x^2)

Post by Feil »

I made a mistake in my post. I wrote
some dumbass named Feil wrote:The ratio of the m-1 term term to the m+1 term is always m/2 which is 2^n-2[THIS PART IS WRONG], but remember that the m-1 term includes k, which is one power of 2 less than the m+1 term, so

2^n*x^n*e^[x2] + 2^n-2*2^n-1*x^n-2*e^[x2]

This should be

The ratio of the m-1 term term to the m+1 term is always m/2 which is n-1/2, but remember that the m-1 term includes k, which is one power of 2 less than the m+1 term, so we can put the 1/2 into that and make it 3 powers of 2 less, or:

2^n*x^n*e^[x2] + 2^n-2*1/2 *n-1*x^n-2*e^[x2]

Also, the same-order term from the derivative of the m-2 term is, of course, NOT what I said it was but rather it is just 2^n-2*x^n-2*e^[x2] because it is the counterpart of the highest-order term (the same but with m-2 increased to n-2 = m-1).

So the combined term is
2^n*x^n*e^[x2] + 2^n-2 *(1/2*n-1*+ 1)*x^n-2*e^[x2]

unless I made another mistake that I didn't notice.
Post Reply