syms x;f(x) = ((1 + x)^(1/3));Ln = functionLinear(f, 2);disp(LN);
Define the function that will return the tangent line 'res' symbolically. This way I can plot both the actual function and the tangent evaluated at point 'a'. The below function is what I coded, and I am not able to get the symbolic expression back.
function[res] = functionLinear(func, a)syms x;g(x) = diff(func);res = g(a)*(x-a) + func(a);end
Best Answer