# How to expand $x \sqrt{4 - x}$ to Maclaurin series?

Here is the task: using standard expansions, expand $f(x) = x \sqrt{4-x}$ to Maclaurin's series.

I calculated derivatives up to $f^{(5)}(x)$, and got some results.

Fortunately, in Maclaurin's expansion I need to calcalate $f^{(n)}(0)$, which simplifies the task a little. Here is what I've got:

$d(n) = 1 \times 3 \times 5 \times \ldots \times (2n-1) = \frac{(2n)!}{2^nn!}$ (a function for calculating product of first n odd numbers)

$r(n)= \begin{cases} (2(n - 2) - 1) \times (r(n-1) + d(n-3)),&\text{if$n > 3$;}\\ 3,&\text{if$n = 3$.} \end{cases}$

$r(n)$ is calculated iteratively or recursively, and it frightens me. However, factorial function is iterative/recursive too, so my $r(n)$ is not worse, but I still somewhat displeased by it. What about derivatives,

$f^{(n)}(0)= \begin{cases} 0,&\text{if$n = 0$;}\\ 2,&\text{if$n = 1$;}\\ -1/2,&\text{if$n = 2$;}\\ -r(n) \times 2^{n-2},&\text{if$n \geq 3$.} \end{cases}$ ($f^{(0)}(x) = f(x)$, if this is confusing)

And it seems to work. I just calculated derivatives and noticed how next derivative is produced from previous. How the series is written down is obvious. But I didn't use any "standard expansions". Could this task be done easier and could the $f^{(n)}(0)$ formula be more beautiful?

-

You can just expand $(4-x)^{1/2}$ by bionomial theorem, then multiply by $x$.
update: the result is indeed very messy ($n=20$, by mathematica):
$$-\frac{119409675 x^{20}}{4722366482869645213696}-\frac{64822395 x^{19}}{590295810358705651712}-\frac{17678835 x^{18}}{36893488147419103232}-\frac{9694845 x^{17}}{4611686018427387904}-\frac{334305 x^{16}}{36028797018963968}-\frac{185725 x^{15}}{4503599627370496}-\frac{52003 x^{14}}{281474976710656}-\frac{29393 x^{13}}{35184372088832}-\frac{4199 x^{12}}{1099511627776}-\frac{2431 x^{11}}{137438953472}-\frac{715 x^{10}}{8589934592}-\frac{429 x^9}{1073741824}-\frac{33 x^8}{16777216}-\frac{21 x^7}{2097152}-\frac{7 x^6}{131072}-\frac{5 x^5}{16384}-\frac{x^4}{512}-\frac{x^3}{64}-\frac{x^2}{4}+2 x$$
When I was taught Taylor expansions, at least, we did not know that it was meaningful to expand the domain of the binomial coefficient to non integer $n$ and $k$, which of course you would need for the binomial expansion. –  Eric Stucky Dec 23 '12 at 10:54
@EricStucky neither was I. Just googled out $\sqrt{1+x}$ expansion, maybe I'll use it not to deal with fractional binomial coefficients. –  o2genum Dec 23 '12 at 11:10
@o2genum: When the denominator is two, the fractional binomial coefficients are not that terrible: in fact, they look very much like your $d(n)$ –  Hurkyl Dec 23 '12 at 12:12