Isolated System

On Fahrenheits and Parabolas

My grandmother passed away last month, so I was down in India for ten days or so, not really studying (or in the mood to). Getting back, I found it difficult to get back on the horse. I consider the last month to have been a wash out.

I did do some work on the graphing and elementary geometry/trigonometry chapters, and then was having fun with Octave, so this is what that post is about.

Converting Fahrenheit to Celsius

Conversion from °F to °C is a linear equation, and it is often introduced in books of Algebra. We all know that at 40°C we are also at 40°F, for example. Or that water boils at 100°C and 212°F. Using values like these, we can easily derive the equation for the conversion between F to C, which is thus:

$${}^\circ F = \frac{9}{5} {}^\circ C + 32 $$

This is not interesting. But we are often told that a good rule of thumb to go from Celsius to Fahrenheit is “double the °C, then add 30”:

$${}^\circ F = 2 \cdot {}^\circ C + 30$$

This is also not interesting.

What I wanted to know was how much is the error in this simplification? Well the answer is below:

The main thing to note is that, at 10°C, the values are exact. There is no error. In both cases, you arrive exactly at 50°F. Beyond that, the approximation has a bit higher slope than the real conversion, so you underpredict the F before that, but exaggerate the real temp above it.

You’ll also see on the scale of the error plot that, very quickly, we can end up being 20°F off the real values. Our interest, however, is vaguely in the realm of ‘meterological’ temperatures, especially in a United States context. If we take Maryland, it sees temperatures between about -10°C and 40°C, exaggerating the end points for the sake of illustration. In this domain, we’re off by less than 10°F. This works out pretty well because I’ve never known an American who didn’t speak about the weather rounding up to the nearest 10°F anyway.

On Parabolic mirrors

The angle of incidence equals the angle of reflection. But does this mean that any incoming rays (parallel to the axis) pass through the focus? I wrote a script to see this.

Here’s my parabolic mirror below.

It has the equation of $y^2 = 4 \cdot 1 \cdot x$, written in this weird way to emphasise that p = 1. We know that p is the point of focus, and I wanted a parabola where the rays would pass through $x = 1$. We now take a ray that comes and hits the parabola at y = 1.5, as shown below. Next, we draw the tangent at where it meets the parabolic mirror: We draw the perpendicular to this tangent. This is the axis about which the incoming ray will be reflected. Finally, we can draw the reflected ray: It does indeed pass through the focus, as absolutely everyone knew it would. But it’s pleasing to have a script that can take essentially any incoming ray and plot it. Here’s for example a ray coming in parallel at y = 0.5: Codes below. I hope next month to have an update on the real project.

%% What is the error when using the simplified conversion between F and C?
clc
clear

% Default values
font = 'Cooper Hewitt Medium';
size = 11;
axSize = 12;
width = 1.5;

set(0,'defaultlinelinewidth',width);
set(0,'defaulttextfontname',font);
set(0,'defaultaxesfontname',font);
set(0,'DefaulttextFontSize',size);
set(0,'DefaultaxesFontSize',axSize);

C = -100:0.1:100;
F_real = 9/5.*C + 32;
F_approx = 2.*C + 30;
error = (F_approx - F_real);

figure
subplot(2,1,1);
plot(C,F_real);
hold on
plot(C,F_approx);
grid on
xlabel('°C');
ylabel('°F');
xticks(-100:10:100)
legend({'Real', 'Approximate'},'location','northwest')

subplot(2,1,2)
plot(C,error);
xlabel('°C');
ylabel('Error (°F)');
grid on
xticks(-100:10:100)
%% Does the parabolic mirror send all parallel rays through the focus?

clc
clear
close all

% PLOT DEFAULTS
font = 'Cooper Hewitt Medium';
size = 11;
axSize = 12;
width = 1.5;

set(0,'defaultlinelinewidth',width);
set(0,'defaulttextfontname',font);
set(0,'defaultaxesfontname',font);
set(0,'DefaulttextFontSize',size);
set(0,'DefaultaxesFontSize',axSize);

% DETERMINE THE PARABOLA

% --------------------
% y^2 = 4.p.x;
% --------------------

p = 1; % Focus coordinate on x-axis
y = -3:0.01:3;
x = (y.^2)./(4*p);
h = figure("visible", "off");

set(h, "units", "pixels", "position", [100 100 800 800])

plot(x,y);
hold on

% Plot properties
grid on
xlim([0,max(x)]);
ylim([min(y),max(y)]);
xticks(1:1:max(x));
yticks(min(y):1:max(y));
axis equal

% saveas(h,'parabolic-mirror-1.png','png')
print('-dsvg', 'parabolic-mirror-1.svg');

% INCOMING RAY
y0 = 0.5;
x0 = y0^2/(4*p);
line("xdata", [x0, max(x)],"ydata", [y0, y0], 'color','k');
ylim([0,max(y)]);

% saveas(h,'parabolic-mirror-2.png','png')
print('-dsvg', 'parabolic-mirror-2.svg');

% TANGENT TO PARABOLA
% y^2 = 4px
% ⇒ 2y.dy = 4p.dx
% ⇒ dy/dx = 4p/2y = 2p/y
m = 2*p/y0;
x_tgt = 0:0.1:max(x);
y_tgt = m * (x_tgt - x0) + y0;
plot(x_tgt, y_tgt,'k:');

% saveas(h,'parabolic-mirror-3.png','png')
print('-dsvg', 'parabolic-mirror-3.svg');

% PERPENDICULAR TO TANGENT
m2 = -1/m; % m1 * m2 = -1
y_perp = y0:-0.01:0;
x_perp = (y_perp - y0)./m2 + x0;
plot(x_perp, y_perp, 'k:')

% saveas(h,'parabolic-mirror-4.png','png')
print('-dsvg', 'parabolic-mirror-4.svg');

% REFLECTED RAY
% Angle of incidence and reflection are the same about the perpendicular
slope_angle = atand(m); % dy/dx = 1/4, and tan^-1(1/4) = slope angle
angle_of_incidence = 90 - slope_angle;
angle_of_reflection = angle_of_incidence;
% Now, the sum of the AoI, AoR and the SlopeAngle together make a 180° line.
% So, we can calculate the onward angle as:
onward_angle = 180 - angle_of_incidence - angle_of_reflection;
m3 = tand(onward_angle);
x_ref = x0:0.1:4;
y_ref = m3.*(x_ref-x0) + y0;
plot(x_ref, y_ref, 'k');

% saveas(h,'parabolic-mirror-5.png','png')
print('-dsvg', 'parabolic-mirror-5.svg');