function [ result ] = exp_x( x,n )
%Computes exp(x) base on the first n terms of the MacLaurin series
    result=1;
    for k=1:n
        result = result + x.^k/factorial(k);
    end
end

