Personalized Polynomial

Personalized Polynomial
Creating the polynomial that passes through a set of letter-points from a word.
x-cordinate of a letter-point is the position of the letter in the word.
The first letter has a position of one, the second letter has a position of two...
The y-cordinate of the letter-point is the depth of the letter in the alphabet.
A has a depth of 1, B has a depth of two...
The word for this personalized polynomial is “SAMUEL”.
ClearAll;
Defining the Polynomial
The word “SAMUEL” is six letters long.
Part S
Defining the part of the polynomial for “S”.
“S” is the first letter in “SAMUEL” and the 19th letter of the alphabet.
Sa@x_D:=19*Product@Hx-iL, 8i, 2, 6<D
Product@H1-iL, 8i, 2, 6<D;
Part A
Defining the part of the polynomial for “A”.
“A” is the second letter in “SAMUEL” and the 1st letter of the alphabet.
Aa@x_D:=1*Product@Hx-iL, 8i, 1, 1<D*Product@Hx-iL, 8i, 3, 6<D
HProduct@H2-iL, 8i, 1, 1<D*Product@H2-iL, 8i, 3, 6<DL;
Part M
Defining the part of the polynomial for “M”.
“M” is the third letter in “SAMUEL” and the 13th letter of the alphabet.
Ma@x_D:=13*Product@Hx-iL, 8i, 1, 2<D*Product@Hx-iL, 8i, 4, 6<D
HProduct@H3-iL, 8i, 1, 2<D*Product@H3-iL, 8i, 4, 6<DL;
Part U
Defining the part of the polynomial for “U”.
“U” is the forth letter in “SAMUEL” and the 21st letter of the alphabet.
4/5/14
B Group
Ua@x_D:=21*Product@Hx-iL, 8i, 1, 3<D*Product@Hx-iL, 8i, 5, 6<D
HProduct@H4-iL, 8i, 1, 3<D*Product@H4-iL, 8i, 5, 6<DL;
Part E
Defining the part of the polynomial for “E”.
“E” is the fifth letter in “SAMUEL” and the fifth letter of the alphabet.
Ea@x_D:=5*Product@Hx-iL, 8i, 1, 4<D*Product@Hx-iL, 8i, 6, 6<D
HProduct@H5-iL, 8i, 1, 4<D*Product@H5-iL, 8i, 6, 6<DL;
Part L
Defining the part of the polynomial for “L”.
“L” is the sixth letter in “SAMUEL” and the twelveth letter of the alphabet.
La@x_D:=12*Product@Hx-iL, 8i, 1, 5<D
Product@H6-iL, 8i, 1, 5<D;
Tying It Together
Defining the polynomial as the sum of all of its parts.
In[938]:=
SAMUEL@x_D:= Sa@xD + Aa@xD +Ma@xD +Ua@xD + Ea@xD + La@xD;
Simplify@SAMUEL@xDD
1
Out[939]=
120
I7440 - 4018 x - 3595 x2 + 3125 x3 - 725 x4 + 53 x5 M
Displaying the Polynomial
Displaying the Polynomial in a Chart
In[940]:=
Inputs1=Table@i, 8i, 6<D;
Outputs1=Table@SAMUEL@iD, 8i,6<D;
TableData= Transpose@8Inputs1, Outputs1<D;
Table1=TableForm@TableData, TableHeadings® 8None, 8"Input", "Output"<<D
Out[943]//TableForm=
Input
1
2
3
4
5
6
Output
19
1
13
21
5
12
Page 2 of 4
Weaver
Personalized Polynomial.nb |
Displaying the Polynomial in a Graph
The Points and Their Labels
S2=Show@Graphics@8Orange, Disk@81,19<, 8.04,1<D<D,
Graphics@Text@Style@"S", Large, Bold, BlueD, 81.07, 21.5<DDD;
A2=Show@Graphics@8Orange, Disk@82,1<, 8.04,1<D<D,
Graphics@Text@Style@"A", Large, Bold, BlueD, 82, 4<DDD;
M2=Show@Graphics@8Orange, Disk@83,13<, 8.04,1<D<D,
Graphics@Text@Style@"M", Large, Bold, BlueD, 82.9, 15.8<DDD;
U2=Show@Graphics@8Orange, Disk@84,21<, 8.04,1<D<D,
Graphics@Text@Style@"U", Large, Bold, BlueD, 84.05, 23.5<DDD;
E2=Show@Graphics@8Orange, Disk@85,5<, 8.04,1<D<D,
Graphics@Text@Style@"E", Large, Bold, BlueD, 85.07, 8<DDD;
L2=Show@Graphics@8Orange, Disk@86,12<, 8.04,1<D<D,
Graphics@Text@Style@"L", Large, Bold, BlueD, 85.95, 14.8<DDD;
DataPointsAndLabels=Show@S2, A2, M2, U2, E2, L2D;
The Domain and Range
In[951]:=
MinDomain=0;
MaxDomain=7;
Outputs2=Table@SAMUEL@i1000D, 8i, 1000*MinDomain, 1000*MaxDomain<D;
MinRange=Floor@Min@Outputs2DD;
MaxRange=Ceiling@Max@Outputs2DD;
Range1=Abs@MaxRange-MinRangeD;
The Function
In[961]:=
FunctionPlot=Plot@SAMUEL@xD, 8x, MinDomain, MaxDomain<,
AxesLabel® 8"Input", "Output"<, PlotStyle®Blue,
PlotRange® 8MinRange-10100*Range1, MaxRange-60100*Range1<,
PlotLabel® "Personalized Polynomial"D;
3
4/5/14
B Group
Weaver
Tying It Together
In[962]:=
Show@FunctionPlot, DataPointsAndLabelsD
Personalized Polynomial
Output
80
60
40
Out[962]=
20
U
S
M
L
E
A
1
2
Input
3
4
-20
Page 4 of 4
5
6
7