You are on page 1of 6

%1)

clear, clc
disp('1a')
(22+5.1^2)/(50-6.3^2)
disp('1b')
44/7+8^2/5-99/3.9^2
%2
disp('2a')
sqrt(41^2-5.2)/(exp(5)-100.53)
disp('2b')
nthroot(132,3)+log(500)/8
%3
disp('3a')
(14.8^3-6.3^2)/(sqrt(13)+5)^2
disp('3b')
45*(288/9.3-4.6^2)-1065*exp(-1.5)
%4
disp('4a')
(24.5+64/3.5^2+8.3*12.5^3)/(sqrt(76.4)-28/15)
disp('4b')
(5.9^2-2.4^2)/3+(log10(12890)/exp(0.3))^2
%5
disp('5a')
cos(7*pi/9)+tan(7*pi/15)*sind(15)

%6
display('Part(a)')
x = 6.7;
0.01*x^5-1.4*x^3+80*x+16.7
display('Part(b)')
sqrt(x^3+exp(x)-51/x)
%7
clear, clc
display('Part(a)')
t = 3.2;
56*t-9.81*t^2/2
display('Part(b)')
14*exp(-0.1*t)*sin(2*pi*t)

%8
clear, clc
display('Part(a)')
x = 5.1;
y = 4.2;
3/4*x*y-7*x/y^2+sqrt(x*y)
display('Part(b)')
(x*y)^2-(x+y)/(x-y)+sqrt((x+y)/(2*x-y))
%9
clear, clc

a = 12; b = 5.6; c = 3*a/b^2; d = (a-b)^c/c;


display('Part(a)')
a/b + (d-c)/(d+c)-(d-b)^2
display('Part(b)')
exp((d-c)/(a-2*b))+log(abs(c-d+b/a))
%10
clear, clc
r = 24;
V_sphere = 4/3*pi*r^3;
display('Part(a)')
a = nthroot(8*V_sphere,3)
display('Part(b)')
A_sphere = 4*pi*r^2;
a = sqrt(A_sphere/(1/2+1/4+1/8))

%11
clear, clc
a = 11; b = 9;
display('Part(a)')
L_abc = 1/2*sqrt(b^2+16*a^2)+b^2/8*a*log(4*a+sqrt(b^2+16*a^2)/b)
%12
clear, clc
x = pi/12;
display('Part(a)')
sin(5*x)
5*sin(x)-20*(sin(x)^3)+16*(sin(x)^5)
display('Part(b)')
(sin(x))^2*(cos(x))^2
(1-cos(4*x))/8

%13
clear, clc
x = 24;
display('Part(a)')
tand(3*x)
(3*tand(x)-(tand(x))^3)/(1-3*(tand(x))^2)
display('Part(b)')
cosd(4*x)
8*((cosd(x)^4)-(cosd(x))^2) + 1
%14
clear, clc
alpha = pi/6; beta = 3*pi/8;
display('Part(a)')
sin(alpha) + sin(beta)
2*sin((alpha+beta)/2)*cos((alpha-beta)/2)

%15
clear, clc
a = 0.6;
x1 = 3*pi/2; % upper limit of integration
x2 = pi/3;
% lower limit of integration
integral = (sin(a*x1)/a^2-x1*cos(a*x1)/a)-(sin(a*x2)/a^2-x2*cos(a*x2)/a)

%16
clear, clc
a = 5.3; b = 6; gama = 42;
display('Part(a)')
c = sqrt(a^2+b^2-2*a*b*cosd(gama))
display('Part(b)')
beta = asind(b*sind(gama)/c)
alpha = asind(a*sind(gama)/c)
display('Part(c)')
alpha+beta+gama

%17
clear, clc
a = 5; b = 7; gama = 25;
display('Part(a)')
c = sqrt(a^2+b^2-2*a*b*cosd(gama))
display('Part(b)')
beta = asind(b*sind(gama)/c)
alpha = asind(a*sind(gama)/c)
display('Part(c)')
(a-b)/(a+b)
tand((alpha-beta)/2)/(tand((alpha+beta)/2))

%18
clear, clc
l = 4; teta = 35; r = l*sind(teta/2); h = l*cosd(teta/2);
V_cone = pi*h*r^3/3;
V_semisphere = 2/3*pi*r^3;
V_total = V_cone + V_semisphere

%19
clear, clc
a = 48; b = 34; gama = 83;
display('Part(a)')
c = sqrt(a^2+b^2-2*a*b*cosd(gama))
display('Part(b)')
s = (a+b+c)/2;
r = a*b*c/(4*sqrt(s*(s-a)*(s-c)))
%20
clear, clc
x0 = -4; a = 0.6; y0 = -2; b = 0.5; z0 = -3; c = 0.7;
dA0 = sqrt((2-x0)^2+(-3-y0)^2+(1-z0)^2);
d = dA0*sin((acos(((2-x0)*a+(-3-y0)*b+(1-z0)*c)/(dA0*sqrt(a^2+b^2+c^2)))))
%21
clear, clc
a = 16; b = 11;
C = pi*(3*(a+b)-sqrt(3*(a+b)*(a+3*b)))

%22
clear, clc
%Number of people
Total_people = 315;
%Total available seats

Total_seats = 37*ceil(315/37);
%Number of empty seats
Total_seats - Total_people

%23
clear, clc
total_apples = 739;
packaged_apples = 54*fix(739/54);
unpacked_apples = total_apples-packaged_apples
%24
clear, clc
format long
variable = 316501.673;
display('part(a)')
round(100*variable)/100
display('part(b)')
round(1000*variable)/1000
%25
clear, clc
V = 14; R1 = 120.6; R2 = 119.3; R3 = 121.2; R4 = 118.8;
Vab = V*(R1*R3-R2*R4)/((R1+R2)*(R3+R4))

%26
clear, clc
L = 0.15; R = 14; C = 2.6e-6;
f = 1/(2*pi)*sqrt(1/(L*C)-(R/L)^2)

%27
clear, clc
display('part(a)')
n = 49; r = 6;
C = factorial(n)/(factorial(r)*factorial(n-r))
display('part(b)')
n = 6; r = 2;
C6_2 = factorial(n)/(factorial(r)*factorial(n-r));
n = 43; r = 4;
C43_4 = factorial(n)/(factorial(r)*factorial(n-r));
n = 49; r = 6;
C49_6 = factorial(n)/(factorial(r)*factorial(n-r));
C6_2*C43_4/C49_6

%28
clear, clc
a = 4; N = 0.085;
display('part(a)')
log(N)/log(a)
display('part(b)')
a = 6; N = 1500;
log10(N)/log10(a)

%29
clear, clc
R1 = 120; R2 = 220; R3 = 75; R4 = 130;
Req = 1/(1/R1 + 1/R2 + 1/R3 + 1/R4)

%30
clear, clc
v0 = 36; r = 2500; t = 8; C = 1600;
Vc = v0*(1-exp(-t/(r*C)))

%31
clear, clc
%Calculating K
k = log(0.5)/5730
%Calculating estimaded age
t = log(0.7745)/k

%32
clear, clc
display('part(a)')
gcd(91,147)
display('part(b)')
gcd(555,962)

%33
clear, clc
Mw = 9.5;
M01 = 10^(3/2*(Mw+10.7));
Mw = 8.7;
M02 = 10^(3/2*(Mw+10.7));
M01/M02

%34
clear, clc
c = 3e+6;
L = 2;
v = 5000;
delta = L*(1-sqrt(1-v^2/c^2))

%35
clear, clc
%yearly
p = 80000; m = 1; n = 5; r = 0.1;
B1 = p*(1+r/m)^(n*m);
%daily
m = 365;
B2 = p*(1+r/m)^(n*m);
B2-B1

%36
clear, clc
T0 = 79.5; TS = 69;
%Calculating k
k = -log((78-TS)/(T0-TS));

%calculating time
T0 = 98.6;
t = -log((79.5-TS)/(T0-TS))/k;
(9+18/60)-t

%37
clear, clc
sigma = 12000; h = 5; b = 4; a = 1.5;
K = sigma*sqrt(pi*a)*((1-a/(2*b)+0.326*(a/b)^2)/sqrt(1-a/b))

%38
clear, clc
display('part(a)')
t = log(2)/0.15
display('part(b)')
t = log(1000/20)/0.15

%39
clear, clc
format rat
display('part(a)')
5/8+16/6
display('part(b)')
1/3-11/13+2.7^2

%40
clear, clc
format long
TrueVal = factorial(20); n = 20;
ApproxVal = sqrt(2*pi*n)*(n/exp(1))^n;
Error = (TrueVal-ApproxVal)/TrueVal

Related Interests