How do we differentiate functions involving integrals and summations using the symbolic toolbox?
Show older comments
How do we obtain partial derivatives (with respect to w, T, s, V_i, D_i) of the following function using the symbolic toolbox?

It appears to me that the user must 'manually' use the chain rule and second fundamental theorem of calculus and only input pieces of this function into the diff command, keeping in mind what the result should be in the case of a summation. For example,
syms V D w T s
f(V,D,w,T,s) = ( ( V*D^(1/w) )^w - T)/(s*T);
diff(f,V)
Accepted Answer
More Answers (1)
José Federico Geli Manzano
on 2 Dec 2020
Hi, I have slightly different problem I need to take the derivative of an infinite sum with respect to time (which is a discrete variable). A simple example:

I have tried:
>> syms c(t) sigma;
>> assume(sigma>0);
>> assume(sigma<1);
>> S=symsum((c/(1-sigma))^(1-sigma),t,1,Inf);
>> diff(S,c(t))
ans =
piecewise(c(t) == 0 & sigma < 0, 0, c(t) ~= 0 | 0 <= sigma, Inf/(-c(t)/(sigma - 1))^sigma)
There are two problems. First, it does not recognise the assume command since its giving an answer depending on the value of sigma. Second, the most important, none of the proposed solutions yields the result obtained by hand. In the summation C(t) appears only one because then it becames t+1, t+2, etc so then the derivative is trivial.
Any ideas welcomed. Thanks!
Categories
Find more on Numeric Solvers in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!