'Value of /TaylorMaclaurin Series/ graph problem

The right side of the expression must equal the left side. Later I have to draw a graph for both functions. Can someone help me? This is my code

clc
clear all
x=[6,7,8,9,10,11,12,13,14]
a = zeros(1,9);
b = zeros(1,9);
for i=1:9
  b(i)=((6*x(i))/((2+x(i)).*(4-x(i))));
  a(i)=3*x(i)
  for n=2:12
    a(i)=a(i)+((1/(4^n))-(((-1)^n)/(2^n))).*(x(i)^n);
  end
end

figure(1);
plot(x, b, "color", "r")
hold on
plot(x, a, "color", "b")
legend("exact function", "approximate function")

this is what i have to change into a code



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source