ENGR 133: PROBLEM SET 1
Rebecca Arevalo 08/29/23
Problem 1.15 (Practice)
clc, clear, close all
Initialize variables
n=1; %amount of gas, mol
R=0.08206; %gas constant
T=273.2; %temperature in K
V=22.41; %volume, L
a=6.49; %value for Cl
b=0.0562; %value for Cl
Estimate pressure using Ideal Gas Law
Pideal=n*R*T/V; %atm
Van der Waals equation
Pwaals=n*R*T/(V-n*b); %atm
Compare pressure diff between calculations
Pdiff=Pideal-Pwaals;
Determine main casue of pressure diff
PPvol=n*R*T/(V-n*b); %partial pressure due to molecular value
PPatt=a*n^2/V^2; %partial pressure due to molecular attraction
Display results (for all word problems)
disp('The Ideal Gas Law estimated pressure is'),Pideal
The Ideal Gas Law estimated pressure is
Pideal = 1.0004
Problem 1.2
clc, clear, close all
Initialize variables
x=2;
y=5;
1
a.
a=(y*x^3)/(x-y)
a = -13.3333
b.
b=(3*x)/(2*y)
b = 0.6000
c.
c=(3/2)*x*y
c = 15
d.
d=x^5/(x^5-1)
d = 1.0323
Problem 1.12
clc, clear, close all
Initialize variables
x=-7-5i;
y=4+3i;
a.
a=x+y
a = -3.0000 - 2.0000i
b.
b=x*y
b = -13.0000 -41.0000i
c.
c=x/y
c = -1.7200 + 0.0400i
Problem 1.16
clc, clear, close all
2
Initialize variables
T1=258.2; %winter temperature in kelvin
V1=28500; %gas volume in winter
T2=304.2; %summer temperature in kelvin
Solve for volume in summer
V2=(V1*T2)/T1
V2 = 3.3577e+04
Display results
disp('The volume of the tank in the summer is'),V2
The volume of the tank in the summer is
V2 = 3.3577e+04
Problem 1.26
clc, clear, close all
Initialize variables
p=[60,20,-15,30];
find root of p
r=roots(p)
r = 3×1 complex
-1.0381 + 0.0000i
0.3524 + 0.5979i
0.3524 - 0.5979i
Problem 1.28
clc, clear, close all
Initialize variables
x=linspace(0,2);
u=3*log10(70*x+1);
v=4*cos(7*x);
plotting u and v
plot(u,v)
Labeling plot
3
Speed
4
:
2
oo
oo
F
3
0
D
oo
iw
-2
-4
0
2
4
speed
mph
title('Speed')
xlabel('speed mph')
ylabel('speed mph')
4