edrobina

5 Reputation

One Badge

10 years, 250 days

MaplePrimes Activity


These are replies submitted by edrobina

@Preben Alsholm 

They're variables. It would be probably be easiest to just show you the whole thing.

project_real2.pdf

f1 := x -> 2.5*x;

proc (x) options operator, arrow; 2.5*x end proc

(1)

D( (1) );

2.5

(2)

df1 := (2): 'df1';

df1

(3)

f2 := x -> a*x^3 + b*x^2 + c*x + d;

proc (x) options operator, arrow; a*x^3+b*x^2+c*x+d end proc

(4)

D( (4) );

proc (x) options operator, arrow; 3*a*x^2+2*b*x+c end proc

(5)

df2 := (5): 'df2';

df2

(6)

f3 := x -> e*x^3 + f*x^2 + g*x + h;

proc (x) options operator, arrow; e*x^3+f*x^2+g*x+h end proc

(7)

D( (7) );

proc (x) options operator, arrow; 3*e*x^2+2*f*x+g end proc

(8)

df3 := (8): 'df3';

df3

(9)

f4 := x -> i*x^3 + j*x^2 + k*x + l;

proc (x) options operator, arrow; i*x^3+j*x^2+k*x+l end proc

(10)

D( (10) );

proc (x) options operator, arrow; 3*i*x^2+2*j*x+k end proc

(11)

df4 := (11): 'df4';

df4

(12)

f5 := x -> m*x^3 + n*x^2 + o*x + p;

proc (x) options operator, arrow; m*x^3+n*x^2+o*x+p end proc

(13)

D( (13) );

proc (x) options operator, arrow; 3*m*x^2+2*n*x+o end proc

(14)

df5 := (14): 'df5';

df5

(15)

F := x -> piecewise(x <=20, f1(x), x > 20 and x <120, f2(x), x > 120 and x < 220, f3(x), x > 220 and x < 320, f4(x), x > 320 and x <= 400, f5(x));

proc (x) options operator, arrow; piecewise(x <= 20, f1(x), 20 < x and x < 120, f2(x), 120 < x and x < 220, f3(x), 220 < x and x < 320, f4(x), 320 < x and x <= 400, f5(x)) end proc

(16)

D( (16) );

proc (x) options operator, arrow; piecewise(x <= 20, 2.5, x < 120, 3*a*x^2+2*(-120.*a-0.1666666667e-1)*x+3.166666667+3600.*a, x = 120, undefined, x < 220, 3*(0.3206081081e-3+4.189189189*a)*x^2+2*(-.1508591091-2170.570571*a)*x+357963.9640*a+21.52258258, x = 220, undefined, x < 320, 3*(-0.6106106106e-4+.7357357357*a)*x^2+2*(0.3081706707e-1-647.4474474*a)*x-2.996571572+189231.2312*a, x = 320, undefined, x < 400, 3*(0.1446749739e-2+1.487465727*a)*x^2+2*(-1.549792177-1611.981003*a)*x+545.3938667+575601.2534*a, x = 400, undefined, 400 < x, 0) end proc

(17)

dF := (17): 'dF';

dF

(18)

 

 

eq1 := f1(20) = f2(20);

50.0 = 50.00000000

(19)

eq2 := f2(120) = f3(120);

400000.*a+133.3333333 = 133.3333338+400000.00*a

(20)

eq3 := f3(220) = f4(220);

16.2062068-235435.4*a = 16.2062061-235435.44*a

(21)

eq4 := f4(320) = f5(320);

30.0000001 = 30.00001

(22)

eq5 := df1(20) = df2(20);

2.5 = 2.500000000

(23)

eq6 := df2(120) = df3(120);

18000.*a-.833333333 = -.83333333+18000.0000*a

(24)

eq7 := df3(220) = df4(220);

1.69687187+11183.1829*a = 1.696871873+11183.1832*a

(25)

eq8 := df4(320) = df5(320);

-2.031606612+882.8828*a = -2.0316066+882.883*a

(26)

eq9 := f2(80) = 140;

140.0000000 = 140

(27)

eq10 := f3(180) = 25;

24.9999988-0.1e-1*a = 25

(28)

eq11 := f4(260) = 65;

65.0000004 = 65

(29)

eq12 := f5(320) = 30;

30.00001 = 30

(30)

eq13 := f5(400) = 0;

-421.63219-345475.9*a = 0

(31)

eq14 := df5(400) = 0;

-0.7e-6 = 0

(32)

eq15 := f5(325) = 16;

16.00001+.1*a = 16

(33)

eq16 := f4(300) = 60;

59.9999995-0.1e-1*a = 60

(34)

values := solve({eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11, eq12, eq13, eq14, eq15, eq16}, {a, b, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p});

Warning, solving for expressions other than names or functions is not recommended.

 

"values:="

(35)

assign(values);

plot(F(x), x=0..400, y=-50..250);

 

Emma Drobina



Download project_real2.mw

 

Page 1 of 1