cubiccoaster1hill.mws

C. Design and Thrill of One Coaster Drop using a Polynomial Function

In this Maple worksheet, we build one hill of a roller coaster using one peak and one valley point.  Our approach is to determine a cubic polynomial of the form f (x) = a*x^3+b*x^2+c*x+d   that connects these points and then to calculate the angle of steepest descent/ascent and the resulting thrill factor.

I.  Getting Started

We clear all variables.  To avoid multiple solutions, we set the maximum number of solutions variable equal to 1.

>    restart:

>    _MaxSols:=1:

II.  Data Points

We enter x coordinates and y coordinates and slope conditions for the peak and valley points using lists.  These lists can be easily extended to cover the case where more than 2 peak and valley points are used and the more complicated case where general points (not necessarily peak and valley points) are used.  

In this example, we have an initial peak at (0,75) followed by the first valley at (50,0).

In your work, use the collected peak and valley data points from the Colossus (Module A).

>    xdata:=[0,50]:

>    ydata:=[75,0]:

>    slopes:=[0,0]:

III.  Connecting Cubic Polynomial

We determine cubic polynomials of the form f(x) = a*x^3+b*x^2+c*x+d    that connect the peak and valley points (with zero slope conditions).  Note that the Maple code is designed for easy extension using a "do" loop for the case where more than 2 peaks and valleys have been marked.

We define a function f(x) with unknown coefficients a1, b1, c1, d1 and then determine f ' (x).

>    f:=x->a[1]*x^3+b[1]*x^2+c[1]*x+d[1]:

>    fp:=D(f):

Now, we "fit" f(x) to the peak and valley conditions.

>    s[1]:=fsolve({f(xdata[1])=ydata[1],fp(xdata[1])=slopes[1],f(xdata[2])=ydata[2],fp(xdata[2])=slopes[2]},{a[1],b[1],c[1],d[1]}):

>    assign(s[1]):

>    f:=x->a[1]*x^3+b[1]*x^2+c[1]*x+d[1]:

We plot our function f(x) for the given interval and display.

>    tplot[1]:=plot(f(x),x=xdata[1]..xdata[2]):

>    with(plots):

Warning, the name changecoords has been redefined

>    display(tplot[1]);

[Maple Plot]

Our function looks correct.  It goes throught the given peak and valley points with proper slope.

IV.  Calculation of Angle of Steepest Descent

Now we must find the angle of steepest descent.

So, we must find the maximum value of the absolute value of the derivative on the interval [x1,x2].  

We first graph the absolute value of   f ' on the given interval.

From the graph below, it looks like  f ' has an absolute minimum at about x = 25.

>    f:=x->a[1]*x^3+b[1]*x^2+c[1]*x+d[1]:

>    fp:=D(f):

>    plot(abs(fp(x)),x=xdata[1]..xdata[2]);

[Maple Plot]

To work exactly, we find all critical points of f ' on the given interval and then evaluate and compare values of f ' at the critical points and at the endpoints.

Location of angle of steepest descent/ascent and slope

>    fpp:=D(fp):

>    p1:=fsolve(fpp(x)=0,x,xdata[1]..xdata[2]);

p1 := 25.

>    slope1:=max(abs(fp(xdata[1])),abs(fp(xdata[2])),abs(fp(p1)));

slope1 := 2.250000000

The maximum value of the absolute value of the slope is 2.25.

Check:  How does this slope value compare with your previous work?

Angle measure

To find the associated angle in radian measure, we use the inverse tangent function

>    rangle1:=arctan(slope1);

rangle1 := 1.152571997

To find the associated angle in degree measure, we simply convert radians to degrees.

>    dangle1:=evalf(rangle1*180/Pi);

dangle1 := 66.03751101

The angle of steepest descent for this hill is 66.03751101 degrees.

V.  Safety Restrictions and Thrill Factor

Safety Criteria

For this hill, the angle of steepest descent is 66.03751101 degrees and so it is SAFE (less than 80 degrees).

Thrill Factor

The thrill for this drop is

>    rangle1*abs(ydata[2]-ydata[1]);

86.44289978

>   

VI.  Observation and Generalization

Build another hill using the collected peak and valley data points from Steel Dragon (Module A)

Keeping in mind the coaster restrictions, build several more roller coaster drops using several different peak and valley combinations.  Keep a record of your results.