i'm trying to plot Maxwell distribution and draw a line where average speed varg, most probable speed vm, and rms speed vrms, and label those lines.
my struggle how to plot these lines and combine graphics with plot in Show.
here is the code easy and short!
k = 1.38064852*10^(-23);
m = 28*1.660538782*10^(-27);
t = 300;
max[v_] := ((m/2 Pi k t)^3/2 )*(4 Pi v^2) Exp[-((m*v^2)/(2 k t))]
p1 = Plot[max[v], {v, 0, 1200}]
vm = Sqrt[2 k t/m]
vrms = Sqrt[3 k t/ m]
vavg = Sqrt[8/Pi]*Sqrt[k t /m]
l1 = Graphics[Line[{vm, 0}, {vm, y}]]
l2 = Line[{0, vrms}]
l3 = Line[{0, vavg}]
Show[p1, l1]
l1 = Graphics[Line[{vm, 0}, {vm, y}]]
will not be well defined. $\endgroup$Line[{{x1, y1}, {x2, y2}}]
: you are missing a set of braces; you should also probably useInfiniteLine
here. $\endgroup$