Message Boards Message Boards


Computing Derivative of Summation

Posted 9 years ago
3 Replies
0 Total Likes

I'm trying to get used to computing derivatives within Mathematica but am unsure as to how to compute a derivative with a summation within the expression. Is there anyway someone can show me how to compute the derivative of the following function using commands in Mathematica?

f (x) = Summation [ ke^-(ax^3)] with k min = 1, k max = 7] with a being a constant

Do I need to define a as a constant prior?

Any ideas?

The answer should come out to -3akx^2

POSTED BY: Warren Durrett
3 Replies

Will the following be sufficient? It has the derivative term, multiplied by the result of the summation where the limits have been parametrized.

In Clear["Global`"]; ( Clear. *)

s[x_] := Sum[ k Exp[-a x^3], {k, m, n}]; (* Define the expression. *)

D[ s[x], x] (* Find Derivative. *)

Out[140]= 3/2 a E^(-a x^3) (-1 + m - n) (m + n) x^2

When m and n are assigned values, we will get back a single expression.

In[141]:= % /. {m -> 1, n -> 7}

Out[141]= -84 a E^(-a x^3) x^2

POSTED BY: Isaac Abraham
Posted 9 years ago

Wait you're right about the exponential!

However, the answer should come off as -summation (k = 1 to k = 7) 3kax^2e^-(a^3)

but what you gave isn't correct - do I need to state that a is a constant prior?

POSTED BY: Warren Durrett

The answer should come out to -3akx^2

What happend to exp() function in the answer? This is what Mathematica gives

   Clear[x, a, k]
   f = Sum[ k Exp[-a x^3], {k, 1, 7} ];
   D[f, x]
    (* (-84*a*x^2)/E^(a*x^3) *)

There is no need to define a function f[x] in here. it is just an expression. But this also works

  Clear[x, a, k]
  f[x_] := Sum[ k Exp[-a x^3], {k, 1, 7} ];
  D[f[x], x]
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract