The following problem appeared in Volume 96, Issue 3 (2023) of Mathematics Magazine.
Evaluate the following sums in closed form:

and
.
In the previous two posts, I showed that
;
the technique that I used was using the Taylor series expansions of
and
to write
and
as double sums and then interchanging the order of summation.
In the post, I share an alternate way of solving for
and
. I wish I could take credit for this, but I first learned the idea from my daughter. If we differentiate
, we obtain
![g'(x) = \displaystyle \sum_{n=0}^\infty \left( [\sin x]' - [x]' + \left[\frac{x^3}{3!}\right]' - \left[\frac{x^5}{5!}\right]' \dots + \left[(-1)^{n-1} \frac{x^{2n+1}}{(2n+1)!}\right]' \right)](https://s0.wp.com/latex.php?latex=g%27%28x%29+%3D+%5Cdisplaystyle+%5Csum_%7Bn%3D0%7D%5E%5Cinfty+%5Cleft%28+%5B%5Csin+x%5D%27+-+%5Bx%5D%27+%2B+%5Cleft%5B%5Cfrac%7Bx%5E3%7D%7B3%21%7D%5Cright%5D%27+-+%5Cleft%5B%5Cfrac%7Bx%5E5%7D%7B5%21%7D%5Cright%5D%27+%5Cdots+%2B+%5Cleft%5B%28-1%29%5E%7Bn-1%7D+%5Cfrac%7Bx%5E%7B2n%2B1%7D%7D%7B%282n%2B1%29%21%7D%5Cright%5D%27+%5Cright%29&bg=ffffff&fg=000000&s=0&c=20201002)



.
Something similar happens when differentiating the series for
; however, it’s not quite so simple because of the
term. I begin by separating the
term from the sum, so that a sum from
to
remains:

.
I then differentiate as before:
![f'(x) = (\cos x - 1)' + \displaystyle \sum_{n=1}^\infty \left( [\cos x - 1]' + \left[ \frac{x^2}{2!} \right]' - \left[ \frac{x^4}{4!} \right]' \dots + \left[ (-1)^{n-1} \frac{x^{2n}}{(2n)!} \right]' \right)](https://s0.wp.com/latex.php?latex=f%27%28x%29+%3D+%28%5Ccos+x+-+1%29%27+%2B+%5Cdisplaystyle+%5Csum_%7Bn%3D1%7D%5E%5Cinfty+%5Cleft%28+%5B%5Ccos+x+-+1%5D%27+%2B+%5Cleft%5B+%5Cfrac%7Bx%5E2%7D%7B2%21%7D+%5Cright%5D%27+-+%5Cleft%5B+%5Cfrac%7Bx%5E4%7D%7B4%21%7D+%5Cright%5D%27+%5Cdots+%2B+%5Cleft%5B+%28-1%29%5E%7Bn-1%7D+%5Cfrac%7Bx%5E%7B2n%7D%7D%7B%282n%29%21%7D+%5Cright%5D%27+%5Cright%29&bg=ffffff&fg=000000&s=0&c=20201002)



.
At this point, we reindex the sum. We make the replacement
, so that
and
varies from
to
. After the replacement, we then change the dummy index from
back to
.



With a slight alteration to the
term, this sum is exactly the definition of
:


.
Summarizing, we have shown that
and
. Differentiating
a second time, we obtain

or
.
This last equation is a second-order nonhomogeneous linear differential equation with constant coefficients. A particular solution, using the method of undetermined coefficients, must have the form
. Substituting, we see that
![[Ax \cos x + B x \sin x]'' + A x \cos x + Bx \sin x = -\cos x](https://s0.wp.com/latex.php?latex=%5BAx+%5Ccos+x+%2B+B+x+%5Csin+x%5D%27%27+%2B+A+x+%5Ccos+x+%2B+Bx+%5Csin+x+%3D+-%5Ccos+x&bg=ffffff&fg=000000&s=0&c=20201002)


We see that
and
which then lead to the particular solution

Since
and
are solutions of the associated homogeneous equation
, we conclude that
,
where the values of
and
depend on the initial conditions on
. As it turns out, it is straightforward to compute
and
, so we will choose
for the initial conditions. We observe that
and
are both clearly equal to 0, so that
as well.
The initial condition
clearly imples that
:


To find
, we first find
:


.
Since
, we conclude that
, and so


.