25 1 A The value of In1 x for 1 Solution xinputenter value o

(25) 1. A. The value of In(1 x) for -1

Solution

>> x=input(\'enter value of x\');

>> n=input(\'number of terms required\');

>>output=calculate(x,n);

function result=calculate(x,n):

sum=x;

for a= 1:n

sum=sum+ (-1.^a)*(x.^2)*(1/(a+1));

end

result=sum;

end

 (25) 1. A. The value of In(1 x) for -1 Solution>> x=input(\'enter value of x\'); >> n=input(\'number of terms required\'); >>output=calculate

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site