Project
Matlab coding of topics from CO2 to CO4.
MATH147
2Q1819Info! Broken links? Email us at gtechphofficial@gmail.com
Course Outcome 2
syms x
int(5*(sec(pi*x))^2)
syms x
int(x^2/sqrt(4+x^2))
syms x
int((exp(2*x))*(x^3+x^2+2*x-1))
Course Outcome 3
syms x
int(((x^7+1)*(3*x^2+1)),-2,2)
syms x
int(1/sqrt(4-x^2),0,2)
f(x)=(1/sqrt(4-x.^2));
fplot(1/sqrt(4-x^2),[0,2])
daspect([1 5 1]);
line([2.1,2.1], [0.0]);
grid on
syms x
int((x^2),1,2)
y = @(x) (x.^2);
x = linspace(0, 1);
inty = cumtrapz(x,y(x));
figure(1)
plot(x, inty, '-k', 'LineWidth', 2)
hold on
patch([x fliplr(x)], [zeros(size(x)) fliplr(inty)], 'b')
grid
Course Outcome 4
syms x y
int(int(exp(-y^2),y,4*x,4),x,0,1)
clear all, close all; clc
x = 0 : 1;
curve1 = 4+0*x;
curve2 = 4*x;
hold on;
x2 = [x, fliplr(x)];
inBetween = [curve1, fliplr(curve2)];
fill(x2, inBetween, 'b');
plot(x, curve2, 'r', 'LineWidth', 2);
plot(x, curve1, 'r', 'LineWidth', 2);
grid
syms x y
int(int(exp(x+y),x,0,x),y,0,1)
syms x y z
int(int(int(z*(sin(x)+cos(y)),z,0,1),y,0,pi/2),x,0,pi)