how to find 100th derivative in matlab

You can use diff and polyder functions in MATLAB to compute the 100th derivative of a given polynomial function. Here is an example code:

main.m
% define your polynomial function
syms x;
f = x^5 + 2*x^3 + 3*x + 4;

% compute the 100th derivative
for i = 1:100
    f = polyder(sym2poly(f));
end

% output the result
fprintf('The 100th derivative is:\n');
disp(f);
218 chars
13 lines

This code defines a polynomial function f, then applies polyder function in a loop 100 times to find the 100th derivative. Finally, it outputs the result.

Note that the polyder function works only with polynomial functions, so you need to convert your function to a polynomial form using sym2poly function. If your function is not a polynomial, you cannot use this method to find its derivative.

related categories

gistlibby LogSnag