0
$\begingroup$

I need MMa to return a general expression for the jth derivative wrt v of v^n.

This didn't work:

expr = Series[E^(x/v), {v, Infinity, 3}] // Normal;
Assuming[j \[Element] Integers, D[expr, {v, j}]]

And this didn't help either:

Derivative[x_, m_][Power][x_, n_] := Product[k, {k, n, n - m + 1}];
D[expr, {v, j}]

So I am stumped.

In this particular example, the result should be:

(* (-1)^j * (j!x + (j+1)!(x^2)/2 + (j+2)!*(x^3)/12 *)

$\endgroup$
2
  • $\begingroup$ @belisarius I'm not trying to get a Series for E^(x/v), I'm trying to get the jth deriv wrt an expression in v. $\endgroup$ Mar 1, 2015 at 22:00
  • $\begingroup$ @MichaelE2 Nope, same problem. $\endgroup$ Mar 2, 2015 at 2:18

4 Answers 4

3
$\begingroup$
expr = Series[E^(x/v), {v, Infinity, 3}] // Normal;

(* gen some Ds *)
t = Table[Assuming[j ∈ Integers, D[expr, {v, j}]], {j, 1, 10}];

(* get the pattern...*)
seq = FindSequenceFunction[t /. v -> 1, FunctionSpace -> All]

(* spot check some results...*)
yours = (-1)^j*(j! x + (j + 1)! (x^2)/2 + (j + 2)!*(x^3)/12);
SameQ @@@ Table[{yours /. j -> z, seq[z] // Expand}, {z, {0, 1, 5, 20}}]

(*

1/12 (-1)^#1 x Pochhammer[1, #1] (12 + 6 x + 2 x^2 + 6 x #1 + 3 x^2 #1 + x^2 #1^2) &

{True, True, True, True}

*)
$\endgroup$
1
$\begingroup$
expr = Series[E^(x/v), {v, Infinity, 3}] // Normal;
deriv[n_]:= n! SeriesCoefficient[expr, {v, 1, n}]

deriv[10] // Distribute
(* 3628800 x + 19958400 x^2 + 39916800 x^3 *)

deriv[n]// InputForm
(* n! Piecewise[{{((-1)^n*x*(12 + 6*(1 + n)*x + (2 + 3*n + n^2)*x^2))/12,  n > 0},
                 {(6 + x*(6 + 3*x + x^2))/6, n == 0}}, 
                 0]
*)
$\endgroup$
1
$\begingroup$

Maybe this?

Derivative[j_, 0][Power][x_, n_] := Pochhammer[n - j + 1, j] x^(n - j);
D[v^n, {v, j}]
(*  v^(-j + n) Pochhammer[1 - j + n, j]  *)

% /. {n -> 5, j -> 2}
%% /. {n -> 5, j -> 7}
(*
  20 v^3
  0
*)
$\endgroup$
1
$\begingroup$

In M11.1+, D can take symbolic $n^{\text{th}}$ derivatives. So:

expr = Series[E^(x/v), {v, Infinity, 3}] //Normal

res = D[expr, {v, j}] /. v->1

1 + x/v + x^2/(2 v^2) + x^3/(6 v^3)

1/6 x^3 FactorialPower[-3, j] + 1/2 x^2 FactorialPower[-2, j] + x FactorialPower[-1, j]

Check with your expected result:

FullSimplify[
    res == (-1)^j * (j! x + (j+1)! (x^2)/2 + (j+2)! (x^3)/12),
    j ∈ Integers && j>0
]

True

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.