clc
clear all
disp('Calculus Operations')
disp(' ')

%% Chapter 14
disp('                    Part 2 - Integration')
disp('Exercise 1 - Chapter 14')
% INPUTS
disp('INPUTS')
syms x                  % x is symbolic
eqn1=exp(4*x)*cos(x);   % enter the equation
eqn1d=char(eqn1);       % convert the eqn to a string
fprintf('  y = %s\n\n',eqn1d)
% CODE
a=2;
b=8;
eint =int(eqn1,x,a,b);   % definite integration
eintd=char(vpa(eint,7)); % convert to string for display
% OUTPUTS
disp('OUTPUTS')
fprintf('  The integral of the function from %g to %g is %s\n\n',a,b,eintd)

