︠56987bb3-bca1-4a11-997e-2803485c638ci︠ %hide %html
![]() |
![]() |
![]() |
Siam Park City, Bangkok | Dream World, Pathum Thani | The boomerang, at Siam Park City |
According to Google reviews, Dream World in Pathum Thani
ranks higher than Siam Park City in Bangkok. But,
is that because one has better roller coasters than the other?!
Is there a way to mathematically determine -- or, even better --
to mathematically design the best roller coasters?
In this module we will explore certain aspects of this
question.
︡0e261e04-2b3b-4c96-9603-f59addaeccf9︡{"hide":"input"}︡{"html":"\n
\n
\n ![]() | \n \n ![]() | \n \n ![]() | \n
\n Siam Park City, Bangkok\n | \n\n Dream World, Pathum Thani\n | \n\n The boomerang, at Siam Park City\n | \n
\n According to Google reviews, Dream World in Pathum Thani \n ranks higher than Siam Park City in Bangkok. But, \n is that because one has better roller coasters than the other?! \n Is there a way to mathematically determine -- or, even better -- \n to mathematically design the best roller coasters? \n In this module we will explore certain aspects of this \n question."}︡{"done":true}︡
︠bfcefe67-c2c1-4a42-b44f-0126bad00f69i︠
%hide
%html
The photo on the left below is of the Colossus
coaster at Six Flags Mountain in Valencia, California.
(Image from www.ultimaterollercoaster.com.)
We want to model the shape of the track in the form of a
function $y=f(x)$, with $x$, $y$ denoting the horizontal and
vertical distance (in feet) from some reference point. The
sketch on the right shows an example of coordinate locations
of the peak and valley of some hypothetical coaster.
![]() |
![]() |
Colossus, Valencia, California.
Image from http://www.ultimaterollercoaster.com |
Hypothetical peak / valley example |
Suppose we use a cubic polynomial, say $f(x)$, for the shape of the track.
$f(x)=ax^3 + bx^2 + cx + d$.
The four unknown coefficients
$a$, $b$, $c$, $d$ must be determined using 4 conditions we want
the track to satisfy. For example:
$\begin{array}{l} f(5)=50 ~~~~ \mbox{(peak location)} \\ f^\prime(5)=0 ~~~~ \mbox{(0 slope @ peak)} \\ f(65)=5 ~~~~ \mbox{(valley location)} \\ f^\prime(65)=0 ~~~~ \mbox{(0 slope @ valley)} \end{array}$
What system of 4 equations do these conditions yield? How do you solve them?
We want Sage to do all that work for us. But it is still useful to know exactly what Sage will be doing. ︡4dfd41b4-06c4-439a-bac1-649ded61aeb8︡{"hide":"input"}︡{"html":"\n
\n\nThe photo on the left below is of the Colossus \ncoaster at Six Flags Mountain in Valencia, California. \n(Image from www.ultimaterollercoaster.com.)\nWe want to model the shape of the track in the form of a \nfunction $y=f(x)$, with $x$, $y$ denoting the horizontal and \nvertical distance (in feet) from some reference point. The \nsketch on the right shows an example of coordinate locations \nof the peak and valley of some hypothetical coaster.\n\n
\n ![]() | \n \n ![]() | \n
\n Colossus, Valencia, California.\n Image from http://www.ultimaterollercoaster.com\n | \n \n Hypothetical peak / valley example\n | \n
\n\nSuppose we use a cubic polynomial, say $f(x)$, \nfor the shape of the track.
\n \n \n$f(x)=ax^3 + bx^2 + cx + d$.
\n \nThe four unknown coefficients \n$a$, $b$, $c$, $d$ must be determined using 4 conditions we want \nthe track to satisfy. For example:
\n \n$\\begin{array}{l} f(5)=50 ~~~~ \\mbox{(peak location)} \\\\ f^\\prime(5)=0 ~~~~ \\mbox{(0 slope @ peak)} \\\\ \nf(65)=5 ~~~~ \\mbox{(valley location)} \\\\ f^\\prime(65)=0 ~~~~ \\mbox{(0 slope @ valley)} \\end{array}$\n
\n \nWhat system of 4 equations do these conditions yield? \nHow do you solve them?
\nWe want Sage to do all that work for us. But it is still \nuseful to know exactly what Sage will be doing. "}︡{"done":true}︡ ︠35313bb4-e1f8-4de7-86cf-6986075d5e6bs︠ # Sage code to find shape of cubic roller coaster track # with given peak and valley coordinates. a, b, c, d = var('a b c d') # Declare the coefficients as variables. f(x) = a*x^3 + b*x^2 + c*x + d # Define a general cubic polynomial for the track shape. df = derivative(f,x) # Ask Sage to find its 1st derivative. # The next command sets up the 4 equations and asks Sage # to solve for a, b, c, d. # A dictionary containing the solutions is retuned in results[0] # results = solve([f(5) == 50, df(5) == 0, f(65) == 5, df(65) == 0], (a, b, c, d), solution_dict=True) # Next, we plot the solution and see what it looks like # plot( ((1/2400)*x^3 + (-7/160)*x^2 + (13/32)*x + 4705/96), (x,0,75)) plot( ((results[0][a])*x^3 + (results[0][b])*x^2 + (results[0][c])*x + results[0][d]), (x,0,75)) ︡215a8309-7278-4ef8-aeb8-129f36016d41︡{"file":{"filename":"/projects/5af60d30-8ee0-4c83-b7d2-6a0b68f44907/.sage/temp/compute3-us/13636/tmp_DlAiPT.svg","show":true,"text":null,"uuid":"dc3e286a-135b-4a39-8511-409c46412f8e"},"once":false}︡{"done":true}︡ ︠b684b439-7537-4090-b621-a28457179d91i︠ %hide %html But, is this coaster สนุก สุดสุด?!!
Hammer et al. define the thrill
of a coaster as follows:
"The thrill of a drop is defined to be the angle of steepest descent
in the drop (in radians) multiplied by the total vertical
distance in the drop. The thrill of the coaster is defined as
the sum of the thrills of each drop."
Using this definition, compute the thrill of the drop
in the above example. How?
Step 1: Find the maximum value of $|f^\prime|$ on the interval
(this will be the slope of steepest descent)
Step 2: Angle of steepest descent = arctan (slope of steepest descent)
Step 3: Multiply angle by vertical
distance between peak and valley
Again, we want Sage to do most of the work, but we
must understand what work needs to be done.
Here's how to do Step 1, from Hammer et al:
"How do we maximize $f^\prime$ on a closed interval? We determine critical points of $f^\prime$ and then compare function values of $f^\prime$ at critical points and endpoints. The critical points of $f^\prime$ are found by solving $f^{\prime\prime}(x)=0$ on the restricted $x$ interval. Finally we evaluate $f^\prime(x)$ at all critical points and endpoints and choose the maximum value." ︡df437482-edf0-48f0-a3e7-d10e0369d612︡{"hide":"input"}︡{"html":"\nBut, is this coaster สนุก สุดสุด?!!\n
\n Hammer et al. define the thrill \nof a coaster as follows:\n\"The thrill of a drop is defined to be the angle of steepest descent \n in the drop (in radians) multiplied by the total vertical \n distance in the drop. The thrill of the coaster is defined as \n the sum of the thrills of each drop.\"\n \n
\n Using this definition, compute the thrill of the drop \nin the above example. How?
\nStep 1: Find the maximum value of $|f^\\prime|$ on the interval \n (this will be the slope of steepest descent)
\n Step 2: Angle of steepest descent = arctan (slope of steepest descent)
\n Step 3: Multiply angle by vertical \n distance between peak and valley\n
\nAgain, we want Sage to do most of the work, but we \nmust understand what work needs to be done.
\nHere's how to do Step 1, from Hammer et al:
\n\"How do we maximize $f^\\prime$ \non a closed interval? We determine critical points of $f^\\prime$ and then \ncompare function values of $f^\\prime$ at critical points and endpoints. The \ncritical points of $f^\\prime$ are found by solving $f^{\\prime\\prime}(x)=0$ on the restricted \n$x$ interval. Finally we evaluate $f^\\prime(x)$ at all critical points \nand endpoints and choose the maximum value.\"\n"}︡{"done":true}︡ ︠6098ffcc-7b69-46e3-9842-238d2b17a448s︠ # Define f(x): f(x) = (results[0][a])*x^3 + (results[0][b])*x^2 + (results[0][c])*x + results[0][d] fp = derivative(f,x) # Derivative of f fpp = derivative(fp,x) # Derivative of f' = 2nd derivative of f resultnew = solve([fpp == 0], x, solution_dict=True) # Find critical points of f' # A dictionary containing the solutions is retuned in resultnew[0] print "Critical point(s) of f' at: x =", resultnew[0][x] thrill = arctan( abs( fp(resultnew[0][x]))) * (50-5) # Compute thrill using its definition. # Note that arctan of slope = angle in radians. print "thrill=", thrill.n() ︡8445726f-f59d-4a41-84e8-30c5e378f152︡{"stdout":"Critical point(s) of f' at: x = 35\n"}︡{"stdout":"thrill= 37.9869293750927\n"}︡{"done":true}︡ ︠74dfeb8a-a4e4-497f-967c-c0960b19a768i︠ %hide %html Exercise
Shown below are two real-world coasters, together with data on the
coordinates of peak and valley for a single drop. Determine
which drop is more thrilling.
![]() |
![]() |
Colossus, Valencia, California.
Image from http://www.ultimaterollercoaster.com Peak @ (165 ft, 280 ft); valley @ (372 ft, 88 ft) |
Steel Dragon 2000, Nagashima, Japan.
Image from http://www.coastergallery.com Peak @ (224 ft, 309 ft); valley @ (469 ft, 79 ft) |
\nShown below are two real-world coasters, together with data on the \ncoordinates of peak and valley for a single drop. Determine \nwhich drop is more thrilling.\n \n
\n ![]() | \n \n ![]() | \n
Colossus, Valencia, California.\n Image from http://www.ultimaterollercoaster.com \n Peak @ (165 ft, 280 ft); valley @ (372 ft, 88 ft)\n | \n Steel Dragon 2000, Nagashima, Japan.\n Image from http://www.coastergallery.com \n Peak @ (224 ft, 309 ft); valley @ (469 ft, 79 ft)\n | \n