# Taylor series

#### Fermat

##### Active member
Use taylor series to show that the infinite series from n=0 of

$$\frac{s^n}{n!}\frac{d^n}{dq^n}(e^{-q^2})=e^{-(q+s)^2}$$

Last edited by a moderator:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Use taylor series to show that the infinite series from n=0 of

$$\frac{s^n}{n!}\frac{d^n}{dq^n}(e^{-q^2})=e^{-(q+s)^2}$$
Try to expand $$\displaystyle f(x+h)=e^{-(x+h)^2}$$?

#### Fermat

##### Active member
Try to expand $$\displaystyle f(x+h)=e^{-(x+h)^2}$$?
I would prefer to get from LHS to RHS

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I would prefer to get from LHS to RHS
Try to rewrite LHS as $$\displaystyle \frac{h^n}{n!}f^{(n)}(x)$$?

#### Fermat

##### Active member
Try to rewrite LHS as $$\displaystyle \frac{h^n}{n!}f^{(n)}(x)$$?
If I differentiate $e^{-q^2}$ n times then I get $(-2q)^{n}e^{-q^2}$ ?

Then, $\frac{(-2sq)^n}{n!}=e^{-2sq}$ Still missin a factor of $e^{-s^2}$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
If I differentiate $e^{-q^2}$ n times then I get $(-2q)^{n}e^{-q^2}$ ?
No... but you would have $$\displaystyle \frac{d^n}{dq^n}(e^{-q^2})$$, which I believe is what you are looking for...
You do not actually have to differentiate.
You only need to recognize and match an nth derivative.

#### Fermat

##### Active member
No... but you would have $$\displaystyle \frac{d^n}{dq^n}(e^{-q^2})$$, which I believe is what you are looking for...
You do not actually have to differentiate.
You only need to recognize and match an nth derivative.
No, $$\displaystyle \frac{d^n}{dq^n}(e^{-q^2})$$ is part of the LHS which is where I am starting at and then trying to get $e^{-(q+s)^2}$

#### MarkFL

Staff member
If I differentiate $e^{-q^2}$ n times then I get $(-2q)^{n}e^{-q^2}$ ?

Then, $\frac{(-2sq)^n}{n!}=e^{-2sq}$ Still missin a factor of $e^{-s^2}$
I find the same thing. I get:

$$\displaystyle \sum_{n=0}^{\infty}\left[\frac{s^n}{n!}\cdot\frac{d^n}{dq^n}\left(e^{-q^2} \right) \right]=e^{-q^2-2qs}$$

#### Fermat

##### Active member
I find the same thing. I get:

$$\displaystyle \sum_{n=0}^{\infty}\left[\frac{s^n}{n!}\cdot\frac{d^n}{dq^n}\left(e^{-q^2} \right) \right]=e^{-q^2-2qs}$$
Can Opalg (or someone of similar calibre confirm this)? No disrespect Mark but Ihave it on good authority that the result is correct.

#### MarkFL

Staff member
Can Opalg (or someone of similar calibre confirm this)? No disrespect Mark but Ihave it on good authority that the result is correct.
No disrespect taken. In fact, we have both made an error in not applying the product rule for the $n$th derivative on the left side.

#### Opalg

##### MHB Oldtimer
Staff member
If I differentiate $e^{-q^2}$ n times then I get $(-2q)^{n}e^{-q^2}$ ?
If I differentiate $e^{-q^2}$ once then I get $-2qe^{-q^2}$. If I differentiate it a second time (using the product rule) then I get $(-2+4q^2)e^{-q^2}$. The third derivative then comes out as $8qe^{-q^2} -2q(-2+4q^2)e^{-q^2} = (12q - 8q^3)e^{-q^2}.$ It doesn't look like $(-2q)^{n}e^{-q^2}$ except when $n=1$.

You do not actually have to differentiate.
You only need to recognize and match an nth derivative.
Take this advice seriously! I think that ILS has the right approach.

#### Fermat

##### Active member
Its not a 'show that' question so I cannot start the RHS (the answer). That's why I need to start with the LHS. I didn't make that clear- sorry.

#### Fermat

##### Active member
I really don't know what you mean by 'match derivative'.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I really don't know what you mean by 'match derivative'.
You are supposed to sum a series of terms.
The trick to get it summed, is to match it with a Taylor series.
If you can find a function $f$, such that each of your terms matches the corresponding Taylor term, you can write the infine sequence as an expression with that $f$.

Each Taylor term is of the form $$\displaystyle \frac{h^n}{n!}f^{(n)}(x)$$, which belongs to the expansion of $$\displaystyle f(x+h)$$.
So you need to find an $f$, such that $$\displaystyle f^{(n)}(x)$$ matches part of your term.
As it is, you happen to have an nth derivative (which would be the reason to try to match the series with a Taylor expansion in the first place).
So let's try to match that nth derivative with $$\displaystyle f^{(n)}(x)$$.
Your nth derivative is $$\displaystyle \frac{d^n}{dq^n}(e^{-q^2})$$.
So let's try $$\displaystyle f(x) = e^{-x^2}$$.

Consequently, $s$ will have to match $h$.
And from there you have a complete match.
\begin{cases}
h &=& s \\
x &=& q \\
f(x) &=& e^{-x^2}
\end{cases}
It follows that the series sums to $$\displaystyle f(x+h) = e^{-(q+s)^2}$$.

#### Fermat

##### Active member
You are supposed to sum a series of terms.
The trick to get it summed, is to match it with a Taylor series.
If you can find a function $f$, such that each of your terms matches the corresponding Taylor term, you can write the infine sequence as an expression with that $f$.

Each Taylor term is of the form $$\displaystyle \frac{h^n}{n!}f^{(n)}(x)$$, which belongs to the expansion of $$\displaystyle f(x+h)$$.
So you need to find an $f$, such that $$\displaystyle f^{(n)}(x)$$ matches part of your term.
As it is, you happen to have an nth derivative (which would be the reason to try to match the series with a Taylor expansion in the first place).
So let's try to match that nth derivative with $$\displaystyle f^{(n)}(x)$$.
Your nth derivative is $$\displaystyle \frac{d^n}{dq^n}(e^{-q^2})$$.
So let's try $$\displaystyle f(x) = e^{-x^2}$$.

Consequently, $s$ will have to match $h$.
And from there you have a complete match.
\begin{cases}
h &=& s \\
x &=& q \\
f(x) &=& e^{-x^2}
\end{cases}
It follows that the series sums to $$\displaystyle f(x+h) = e^{-(q+s)^2}$$.
I thought a taylor term was of the form $\frac{x^n}{n!}f^{n}(h)$ ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I thought a taylor term was of the form $\frac{x^n}{n!}f^{n}(h)$ ?
There are many ways to write a Taylor series, distinguished by the choice of symbols (although yours would be unusual).
What is the definition of the Taylor series you are referring to?

#### Fermat

##### Active member
There are many ways to write a Taylor series, distinguished by the choice of symbols (although yours would be unusual).
What is the definition of the Taylor series you are referring to?
It is the definition on wikipedia. This is not solved by a simple change of symbols because in my definition the derivative is w.r.t x and then evaluated at h.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
It is the definition on wikipedia. This is not solved by a simple change of symbols because in my definition the derivative is w.r.t x and then evaluated at h.
As it happens, there is no definition on wikipedia combining $x$ and $h$ (although that is usual enough).
Perhaps you can write down the definition you're referring to?

#### Jameson

Staff member
It is the definition on wikipedia. This is not solved by a simple change of symbols because in my definition the derivative is w.r.t x and then evaluated at h.
You aren't given $f(x)$ in this problem. You have $s,q$ as your variables. I like Serena was just writing those in terms of the standard variables $x,h$ (or $x,a$ as I am used to) for Taylor Series to make the connection clear.

The main insight needed to solve this problem is definitely recognizing that this is a Taylor Series in disguise. Then you need to decide what the function, $f$, is and where the series is centered around. It all fits together nicely and ILS has nicely posted all the pieces already.

#### Fermat

##### Active member
As it happens, there is no definition on wikipedia combining $x$ and $h$ (although that is usual enough).
Perhaps you can write down the definition you're referring to?
$f(x)=f(h)+xf'(h)+\frac{x^2}{2}f''(h)+......$

Jameson, please don't try to shut down a mathematical discussion. Thanks

#### Klaas van Aarsen

##### MHB Seeker
Staff member
$f(x)=f(h)+xf'(h)+\frac{x^2}{2}f''(h)+......$
This is not a proper Taylor expansion.
Perhaps you can check the wiki page?
When we have a Taylor expansion that you are comfortable with (and that is correct), we can match the symbols.

#### Fermat

##### Active member
This is not a proper Taylor expansion.
Perhaps you can check the wiki page?
When we have a Taylor expansion that you are comfortable with (and that is correct), we can match the symbols.
Lets take $f(x)=e^x$. I will find macluarin series i.e. h=0

$f^{n}(0)=1$ for all n. So by my definition we have

$e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}$ which is correct.

#### Jameson

Staff member
I have no idea what you mean. I was commenting on what ILS wrote. The choice of what letters you use in the Taylor Series formula isn't important as long it's clear what it means. You have a function of some variable, not necessary $x$, that is centered at some point.

Please make an effort be more respectful in your interaction with others at MHB. If you didn't find my post helpful then please let me know in a constructive way. You have a lot of people here working with you and trying to help, so let's try to be on the same team. If this isn't clear or you want to discuss it further we can talk privately.

I'll let ILS and others continue from here.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Lets take $f(x)=e^x$. I will find macluarin series i.e. h=0

$f^{n}(0)=1$ for all n. So by my definition we have

$e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}$ which is correct.
You are a bit hard headed aren't you?
I take it you did not check the wiki page?

The 2 most common forms of the Taylor expansion are:
\begin{array}{}
f(x)&=&f(a)+\frac{f'(a)}{1!}(x-a) + \frac{f''(a)}{2!}(x-a)^2 + ... \\
f(x+h)&=&f(x)+\frac{f'(x)}{1!}h + \frac{f''(x)}{2!}h^2 + ...
\end{array}

#### Fermat

##### Active member
Thank you for your patience. I still do not see the second form (which I have never seen)on the wikipedia page, but I will take your word for it.

Jameson, your post seemed a not too subtle way of saying 'you've got an answer, now please go away'.