/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/ /* [ Created with wxMaxima version 0.8.5 ] */ /* [wxMaxima: input start ] */ /* wind chill formula */ wc: a + b*T + c*v^e + d*T*v^e; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* wind chill parameters */ vals: [a=35.74, b=0.6215, c=-35.75, d=0.4275, e=0.16]; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* some assumptions */ declare(e,noninteger)$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ assume(b * T - T + a > 0, d * T + c < 0)$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* find T for "wind chill equals temperature" for given v */ Tlimgen: solve([wc = T], [T])[1]; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* insert parameters: limit temperature for given wind speed */ ev(Tlimgen, vals); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* find v for "wind chill equals temperature" for given T */ vlimgen: solve([wc = T], [v])[1]; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* insert parameters: wind speed limit for given temperature */ vlim: ev(vlimgen, vals); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* range where wind chill formula is applicable: above the curve */ wxplot2d([part(vlim,2)], [T, 30, 70], [ylabel, v])$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* Reverse calculation: Find temperatures for two given wind chills */ diffs: solve([wc1 = ev(wc, [T=T1]), wc2 = ev(wc, [T=T2])], [T1, T2])[1]; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* get the difference of those temperatures */ diff: ratsimp(diffs[2] - diffs[1]); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ /* insert parameters: find temperature difference for given windchill difference */ ev(diff, vals); /* [wxMaxima: input end ] */ /* Maxima can't load/batch files which end with a comment! */ "Created with wxMaxima"$