tomleslie

6970 Reputation

17 Badges

10 years, 254 days

MaplePrimes Activity


These are answers submitted by tomleslie

It is always worth reading Maple help pages

############################################################

Excerpt from the LinearAlgebra:-Norm() help page (emphasis added)

The Norm(A) command computes the infinity norm of A

Excerpt from the VectorCalculus:-Norm() help page (emphasis added)

The Norm(v, p) command computes the p-norm of the Vector or vector field v. If p is omitted, it defaults to 2.

So the "default" caclulation will always be different.

##############################################################

Now you can get the same result from both packages

LinearAlgebra:-Norm(v,  p), and

VectorCalculus:-Norm(v, p)

will return the same answers, given the same 'v' and  'p' - you just have to know which 'norm' (ie p-value) you want!

As Carl has already noted, the only "commonly-used" values for the the 'p' in a p-norm are 0,1,2,infinity - but, if you feel like a bit of experimentation, both

LinearAlgebra:-Norm(<3,4>,  37.5), and

VectorCalculus:-Norm(<3,4>,  37.5)

will return the same answer - although what the 37.5-norm of a vector actually means is beyond me (even if it is "defined")

I have no idea what this worksheet is trying to achieve!!

If I tidy up this worksheet a little, then it is simple to confirm that for NN=2, most of the time (> 99%) is taken up in computing the necessary (2^3)^3= 512 triple integrals. Since these integrals always evaluate to either 0 or Pi(-3/2), there seems to be a fair amount of redundant calculation here.

With NN=3, there will be (3^3)^3= 19683 such triple integrals and with NN=4, there will be (4^3)^3= 2621444 - so this problem really does not scale well

I'd be trying to think of a better algorithm, which does scale.

See the attached

  restart;
  NN := 2:
  nu := 1:
  M1 := NN:
  M2 := NN:
  M3 := NN:

  for k1 from 0 while k1 <= M1-1 do
      for k2 from 0 while k2 <= M2-1 do
          for k3 from 0 while k3 <= M3-1 do
              SGP[M3*(M2*k1+k2)+k3+1] := simplify(add((-1)^(k1-i1)*GAMMA(k1+i1+2*nu)*x^i1*(add((-1)^(k2-i2)*GAMMA(k2+i2+2*nu)*y^i2*(add((-1)^(k3-i3)*GAMMA(k3+i3+2*nu)*z^i3/(GAMMA(i3+nu+1/2)*factorial(k3-i3)*factorial(i3)), i3 = 0 .. k3))/(GAMMA(i2+nu+1/2)*factorial(k2-i2)*factorial(i2)), i2 = 0 .. k2))/(GAMMA(i1+nu+1/2)*factorial(k1-i1)*factorial(i1)), i1 = 0 .. k1))
          end do;
      end do;
  end do;

#
# Check the entries in table SGP (idle curiosity!)
#
  entries(SGP, 'nolist');

8/Pi^(3/2), (-16+32*z)/Pi^(3/2), (-16+32*y)/Pi^(3/2), 128*(-1/2+y)*(z-1/2)/Pi^(3/2), (-16+32*x)/Pi^(3/2), 128*(-1/2+x)*(z-1/2)/Pi^(3/2), 128*(-1/2+x)*(-1/2+y)/Pi^(3/2), 64*(-1+2*x)*(-1+2*z)*(-1+2*y)/Pi^(3/2)

(1)

#
# Following two quantities are defined but never used??!!
#
  SGPxyz := `<,>`(seq(seq(seq(SGP[M3*(M2*(i-1)+j-1)+k], k = 1 .. M3), j = 1 .. M2), i = 1 .. M1)):
  Lambda := `<,>`(seq(seq(seq(chi[M3*(M2*(i-1)+j-1)+k], k = 1 .. M3), j = 1 .. M2), i = 1 .. M1)):

#
# Check roughly the time for execution of this group
#
  st:=time():
  for i while i <= NN^3 do
      for j while j <= NN^3 do
          for k while k <= NN^3 do
              q[i, j, k] := int
                            ( int
                              ( int
                                ( SGP[i]*SGP[j]*SGP[k]*(-x^2+x)^(nu-1/2)*(-y^2+y)^(nu-1/2)*(-z^2+z)^(nu-1/2),
                                  z = 0 .. 1
                                ),
                                y = 0 .. 1
                              ),
                              x = 0 .. 1
                            );
          end do:
      end do:
  end do;
  t1:=time()-st;

13.541

(2)

#
# Check roughly the time for execution of this group
#
  st:=time():
  U := Matrix(NN^3, NN^3, 0):
#
# This is the group which OP says takes "forever"
#
#
# Check the entries in the table 'q'
#
  entries(q,'nolist');
#
# Hmmmm nothing too complicated - either 0 or Pi^(-3/2)
#
   for j while j <= NN^3 do
       for k while k <= NN^3 do
         #
         # Note that 'chi' has been defined nowhere in
         # this worksheet
         #
         # Changed 'sum()' to 'add()'
         #
           U[j, k] := add(chi[i1]*q[i1, j, k], i1 = 1 .. NN^3)
       end do;
   end do;
   t2:=time()-st;
   U;

0, 1/Pi^(3/2), 0, 0, 0, 1/Pi^(3/2), 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 1/Pi^(3/2), 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 1/Pi^(3/2), 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 1/Pi^(3/2), 1/Pi^(3/2), 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 1/Pi^(3/2), 0, 1/Pi^(3/2), 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 1/Pi^(3/2), 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 1/Pi^(3/2), 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 1/Pi^(3/2), 0, 1/Pi^(3/2), 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 1/Pi^(3/2), 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 1/Pi^(3/2), 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0, 1/Pi^(3/2), 0, 0, 0, 0, 0, 0, 0, 0

 

t2 := 0.31e-1

 

Matrix(%id = 18446744074620481398)

(3)

#
# Quick way to generate the above matrix
#
  L:=[seq( chi[i]/Pi^(3/2),i=1..8)]:
  Matrix([seq(ListTools:-Rotate(L,j),j=0..7)]);

Matrix(8, 8, {(1, 1) = chi[1]/Pi^(3/2), (1, 2) = chi[2]/Pi^(3/2), (1, 3) = chi[3]/Pi^(3/2), (1, 4) = chi[4]/Pi^(3/2), (1, 5) = chi[5]/Pi^(3/2), (1, 6) = chi[6]/Pi^(3/2), (1, 7) = chi[7]/Pi^(3/2), (1, 8) = chi[8]/Pi^(3/2), (2, 1) = chi[2]/Pi^(3/2), (2, 2) = chi[3]/Pi^(3/2), (2, 3) = chi[4]/Pi^(3/2), (2, 4) = chi[5]/Pi^(3/2), (2, 5) = chi[6]/Pi^(3/2), (2, 6) = chi[7]/Pi^(3/2), (2, 7) = chi[8]/Pi^(3/2), (2, 8) = chi[1]/Pi^(3/2), (3, 1) = chi[3]/Pi^(3/2), (3, 2) = chi[4]/Pi^(3/2), (3, 3) = chi[5]/Pi^(3/2), (3, 4) = chi[6]/Pi^(3/2), (3, 5) = chi[7]/Pi^(3/2), (3, 6) = chi[8]/Pi^(3/2), (3, 7) = chi[1]/Pi^(3/2), (3, 8) = chi[2]/Pi^(3/2), (4, 1) = chi[4]/Pi^(3/2), (4, 2) = chi[5]/Pi^(3/2), (4, 3) = chi[6]/Pi^(3/2), (4, 4) = chi[7]/Pi^(3/2), (4, 5) = chi[8]/Pi^(3/2), (4, 6) = chi[1]/Pi^(3/2), (4, 7) = chi[2]/Pi^(3/2), (4, 8) = chi[3]/Pi^(3/2), (5, 1) = chi[5]/Pi^(3/2), (5, 2) = chi[6]/Pi^(3/2), (5, 3) = chi[7]/Pi^(3/2), (5, 4) = chi[8]/Pi^(3/2), (5, 5) = chi[1]/Pi^(3/2), (5, 6) = chi[2]/Pi^(3/2), (5, 7) = chi[3]/Pi^(3/2), (5, 8) = chi[4]/Pi^(3/2), (6, 1) = chi[6]/Pi^(3/2), (6, 2) = chi[7]/Pi^(3/2), (6, 3) = chi[8]/Pi^(3/2), (6, 4) = chi[1]/Pi^(3/2), (6, 5) = chi[2]/Pi^(3/2), (6, 6) = chi[3]/Pi^(3/2), (6, 7) = chi[4]/Pi^(3/2), (6, 8) = chi[5]/Pi^(3/2), (7, 1) = chi[7]/Pi^(3/2), (7, 2) = chi[8]/Pi^(3/2), (7, 3) = chi[1]/Pi^(3/2), (7, 4) = chi[2]/Pi^(3/2), (7, 5) = chi[3]/Pi^(3/2), (7, 6) = chi[4]/Pi^(3/2), (7, 7) = chi[5]/Pi^(3/2), (7, 8) = chi[6]/Pi^(3/2), (8, 1) = chi[8]/Pi^(3/2), (8, 2) = chi[1]/Pi^(3/2), (8, 3) = chi[2]/Pi^(3/2), (8, 4) = chi[3]/Pi^(3/2), (8, 5) = chi[4]/Pi^(3/2), (8, 6) = chi[5]/Pi^(3/2), (8, 7) = chi[6]/Pi^(3/2), (8, 8) = chi[7]/Pi^(3/2)})

(4)

 


 

Download oddCalc.mw

to use the spacecurve() command to plot 'spikes' at the required points. It can be done (see the attached) - but it seems like an odd thing to do.

For future reference you should upload worksheets using the big green up-arrow in the Mapleprimes toolbar. Many respondents here will not bother to retype code from a picture of your worksheet - it is time-consuming and error-prone

  restart:
  with(plots):

#
# Specify x and y ranges
#
  xrange:=-7..7:
  yrange:=-7..7:
#
# The function
#
  f:=(x,y)->4*y^3+x^2-12*y^2-36*y+x^3+2;
#
# Extreme values of f over specified ranges
#
  extr:=[ maximize(f(x,y), x=xrange, y=yrange),
          minimize(f(x,y), x=xrange, y=yrange)
        ];
#
# Critical points from "first principles"
#
  crits:=[solve([diff(f(x,y),x), diff(f(x,y),y)])];

proc (x, y) options operator, arrow; 4*y^3+x^2-12*y^2-36*y+x^3+2 end proc

 

[926, -2000]

 

[{x = 0, y = -1}, {x = 0, y = 3}, {x = -2/3, y = -1}, {x = -2/3, y = 3}]

(1)

  display
  ( [ #
      # The surface
      #
        plot3d
        ( f(x,y),
          x=xrange,
          y=yrange,
          style=surface
        ),
      #
      # The critical points
      #
        pointplot3d
        ( [ seq
            ( [ rhs~(crits[j])[], f(rhs~(crits[j])[])],
              j=1..numelems(crits)
            )
          ],
          symbol=solidsphere,
          symbolsize=20,
          color=cyan
        ),
      #
      # 'Spikes' through the crital points
      #
        seq
        ( spacecurve
          ( [ rhs~(crits[j])[],t],
              t=extr[1]..extr[2],
              thickness=6,
              color=red
          ),
          j=1..numelems(crits)
        )
    ]
  );

 

 


 

Download crits.mw

Your first calculation returns the squared error, whereas the second returns the error - so the square root of 19/10 is .......?

There are many ways to replicate the error boxes from "first principles", one of them is shown in the attached

  restart;
  pts:= [ [1, 1], [2, 4], [3, 4], [4, 5], [5, 7]]:

  f:=unapply( CurveFitting:-LeastSquares
                            ( pts,
                              x,
                              curve=m*x+b
                            ),
              x
            );
#
# Mean square error
#
  add
  ( ( pts[j][2]-f(pts[j][1]) )^2,
    j =1..numelems(pts)
  );
#
# Mean error
#
  evalf( sqrt(%) );

proc (x) options operator, arrow; 3/10+(13/10)*x end proc

 

19/10

 

1.378404875

(1)

#
# Error plot from first principles
#
  plots:-display
         ( [ plot
             ( [ seq
                 ( [ pts[j][1], f(pts[j][1])],
                   j=1..numelems(pts)
                 )
               ],
               style=pointline,
               symbol=solidcircle,
               symbolsize=16,
               color=blue
             ),
             seq
             (  plottools:-rectangle
                           ( [ pts[j][1], pts[j][2] ],
                             [ pts[j][1]+f(pts[j][1])-pts[j][2], f(pts[j][1])],
                             color=magenta
                           ),
               j=1..numelems(pts)
             )
           ],
           scaling=constrained
        );

 

infolevel[Student[LinearAlgebra]] := 1:
Student[LinearAlgebra]:-LeastSquaresPlot
                        ( pts,
                          x,
                          curve=m*x+b,
                          boxoptions=[color=magenta]
                        );

Fitting curve: .3000+1.300*x
Least squares error: 1.378
Maximum error: 1.100
 

 

 

 


 

Download LS.mw

something like the attached?

  restart;
  with(VectorCalculus):
  v1:=<1+I, 1, I>;
  v2:=<4-1, 0, 2-2*I>;
  DotProduct(v1,v2);

Vector(3, {(1) = 1+I, (2) = 1, (3) = I})

 

Vector(3, {(1) = 3, (2) = 0, (3) = 2-2*I})

 

5+5*I

(1)

 

Download dp2.mw

is shown in the attached

  restart;
  randomize():
  L:=[-1,1];
  r:=rand(1..2):
  numpts:=10000:

[-1, 1]

(1)

  A:=Array(1..2, 0..numpts):
  A[1,0]:=[0,0]:
  A[2,0]:=[0,0]:
  for j from 1 by 1 to numpts do
      A[1,j]:=[A[1, j-1][1]+L[r()], A[1, j-1][2]+L[r()]];
      A[2,j]:=[A[2, j-1][1]+L[r()], A[2, j-1][2]+L[r()]];
  od:
  plot( [ convert(A[1,..], list),
          convert(A[2,..], list)
        ],
        style=line,
        color=[red, blue],
        scaling=constrained
     );

 

 

 


 

Download rWalk.mw

of which three are shown in the attached.

(NB the gridlines don't display in the actual worksheet - they just "appear" when the graphics are rendered on this site!)

  restart:
  with(plots):
  with(plottools):
#
# Generate the plot text to be included in
# all subsequent plots
#
  ptxt:= textplot
         ( [ 3, 3,
             typeset(x=y^2),
             font=[times, bold, 20]
           ]
         ):

#
# Plot y=+sqrt(x) and y=-sqrt(x) then
# combine them
#
  display
  ( [ plot( [sqrt(x), -sqrt(x)],
            x=-5..5,
            color=[blue, blue]
          ),
      ptxt
    ],
    scaling=constrained,
    view=[-5..5, -5..5],
    labels=[x,y]
  );

 

#
# Plot y=x^2 and rotate it
#
  display
  ( [ rotate
      ( plot
        ( x^2,
          x=-2..2,
          color=blue
        ),
        -Pi/2
      ),
      ptxt
    ],
    scaling=constrained,
    view=[-5..5, -5..5],
    labels=[x,y]
  );

 

#
# Use x=y^2 as an implicit plot
#
  display
  ( [ implicitplot
      ( x=y^2,
        x=-5..5,
        y=-5..5,
        color=blue
      ),
      ptxt
    ],
    scaling=constrained,
    view=[-5..5, -5..5],
    labels=[x,y]
  );

 

 

Download para.mw

 

you can use the ApproximateInt() command from the Student[Calculus1] package,  with appropriate options.

See the attached

  restart:
  r:= x -> x*(10-x)/25:
  v:= x -> x*(10-x)/100:
  f:= x -> r(x)*v(x):
#
# Exact solution
#
  int(f(x), x=0..10);

4/3

(1)

#  with(Student[Calculus1]):
#
# 5-point trapezoidal solution ie (0, 2.5, 5, 7.5, 10]
#
  Student[Calculus1]:-ApproximateInt( f(x),
                                      x=0..10,
                                      method=trapezoid,
                                      partition=4
                                    );
  evalf(%);
#
# 5-point midpoint solution
#
  Student[Calculus1]:-ApproximateInt( f(x),
                                      x=0..10,
                                      method=midpoint,
                                      partition=4
                                    );
  evalf(%);
#
# 9-point midpoint solution
#
  Student[Calculus1]:-ApproximateInt( f(x),
                                      x=0..10,
                                      method=midpoint,
                                      partition=8
                                    );
  evalf(%);

85/64

 

1.328125000

 

685/512

 

1.337890625

 

10925/8192

 

1.333618164

(2)

 

 


Download approxInt2.mw

It is generally a bad idea to use variable names "out-of-scope" - whilst it can be done, in some simple cases, (see the first execution group in the attached), I really would not recommend doing this!

A better(?) approach to your problem is shown in the second execution group of the attached, where one has both a 'local' and a 'global' variable named 'x'

  restart;
  foo1:= proc()
             local x;
             return exp(2*sqrt(1/x^2)*x*ln(x)) + exp(sqrt(1/x^2)*x*ln(x)) ;
        end proc:

  sol1:=foo1();
#
# Check whether 'x' in sol1 is 'global' - it isn't
#
  type( indets(sol1, name)[], `global`);
#
# But one can still place assumptions on it!!
#
  simpSol1:=simplify(sol1) assuming indets(sol1, name)[]>0;
#
# Note that 'x' in simpSol is still not 'global'.
# This is likely to cause complicatons in any subsequent
# calculations
#
  type( indets(simpSol1, name)[], `global`);
#
# This is likely to cause complicatons in any subsequent
# calculations - consider for example simple evaluation
#
  eval(simpSol1, x=3);
  eval(simpSol1, indets(simpSol1, name)[]=3);

exp(2*(1/x^2)^(1/2)*x*ln(x))+exp((1/x^2)^(1/2)*x*ln(x))

 

false

 

x^2+x

 

false

 

x^2+x

 

12

(1)

#
# A much more "hygienic" approach
#
  foo2:= proc(a)
              local x:=a;
              return exp(2*sqrt(1/x^2)*x*ln(x)) + exp(sqrt(1/x^2)*x*ln(x)) ;
         end proc:

  sol2:=foo2(x);
#
# Check whether 'x' in sol2 is 'global' - it is!
#
  type( indets(sol2, name)[], `global`);
#
# So simplification is simple
#
  simpSol2:=simplify(sol2) assuming x>0;
#
# As is evaluation
#
  eval(simpSol2, x=3);

exp(2*(1/x^2)^(1/2)*x*ln(x))+exp((1/x^2)^(1/2)*x*ln(x))

 

true

 

x^2+x

 

12

(2)

 

Download locGlo.mw

 

with the attached?

evalf(Int(x^x, x=0..1));

.7834305107

(1)

 

Download doInt.mw

If you want to obtain the 'absolute' position of the pattern in the string, then just omit the range argument from SearchText(): it is optional!

Both of the results in the attached seem eminently sensible to me!

SearchText("ijklm", "abcdefghijklmnopqrstuvWxy", 5..-5);
SearchText("ijklm", "abcdefghijklmnopqrstuvWxy");

5

 

9

(1)

 

Download st.mw

relevant to your second bullet point - isn't this exactly the type of problem for which dataframes were intended?

Organising the data as a 'dataframe', also makes most of the 'sort' requirements rather easier.

See the 'toy' example in the attached and read the help at

?A guide to Dataframes

#
# Set up simple dataframe. (A column of numerical
# values has been added to OP's original, just for
# illustrative purposes
#
   df:= DataFrame
        ( < "Timber",   "Spruce", 17.5;
            "Steel",    "$355",    1;
            "Concrete", "C35",     3.0
          >,
          columns = [material, type, property ],
          rows = ["Material 1", "Material 2", "Material 3"]
        );
 

DataFrame(Matrix(3, 3, {(1, 1) = "Timber", (1, 2) = "Spruce", (1, 3) = 17.5, (2, 1) = "Steel", (2, 2) = "$355", (2, 3) = 1, (3, 1) = "Concrete", (3, 2) = "C35", (3, 3) = 3.0}), rows = ["Material 1", "Material 2", "Material 3"], columns = [material, type, property])

(1)

#
# Sort the dataframe (alphabetically) by the contents
# lf the 'material' column
#
  sort(df, material);

DataFrame(Matrix(3, 3, {(1, 1) = "Concrete", (1, 2) = "C35", (1, 3) = 3.0, (2, 1) = "Steel", (2, 2) = "$355", (2, 3) = 1, (3, 1) = "Timber", (3, 2) = "Spruce", (3, 3) = 17.5}), rows = ["Material 3", "Material 2", "Material 1"], columns = [material, type, property])

(2)

#
# Reverse sort the dataframe by the length of the entry
# in the 'type' column
#
  f:=(x,y)->`if`(length(x)>=length(y), true, false):
  sort( df, type, f);

DataFrame(Matrix(3, 3, {(1, 1) = "Timber", (1, 2) = "Spruce", (1, 3) = 17.5, (2, 1) = "Steel", (2, 2) = "$355", (2, 3) = 1, (3, 1) = "Concrete", (3, 2) = "C35", (3, 3) = 3.0}), rows = ["Material 1", "Material 2", "Material 3"], columns = [material, type, property])

(3)

#
# Sort the dataframe by numerical values in the 'property'
# column
#
  sort(df, property);

DataFrame(Matrix(3, 3, {(1, 1) = "Steel", (1, 2) = "$355", (1, 3) = 1, (2, 1) = "Concrete", (2, 2) = "C35", (2, 3) = 3.0, (3, 1) = "Timber", (3, 2) = "Spruce", (3, 3) = 17.5}), rows = ["Material 2", "Material 3", "Material 1"], columns = [material, type, property])

(4)

#
# Reverse sort the dataframe by numerical values in the
# 'property' column
#
  sort(df, property, `>`);

DataFrame(Matrix(3, 3, {(1, 1) = "Timber", (1, 2) = "Spruce", (1, 3) = 17.5, (2, 1) = "Concrete", (2, 2) = "C35", (2, 3) = 3.0, (3, 1) = "Steel", (3, 2) = "$355", (3, 3) = 1}), rows = ["Material 1", "Material 3", "Material 2"], columns = [material, type, property])

(5)

 

``

Download df2.mw

on what you are going to do with it, but something lke the attached, maybe

with(Statistics):
Y := RandomVariable( EmpiricalDistribution
                     ( [1,2,3],
                       'probabilities' = [0.25, 0.65, 0.1]
                     )
                   );

_R0

(1)

ProbabilityFunction(Y, 2);
CDF(Y, 2.5);
Tally(Sample(Y, 10^6));

.65

 

.90

 

[HFloat(3.0) = 100094, HFloat(2.0) = 650543, HFloat(1.0) = 249363]

(2)

 


 

Download discDist.mw

if I fix one minor typo - explain clearly what is wrong with the attached

restart

with(LinearAlgebra)

NULL

F := proc (x) options operator, arrow; x^2 end proc

F(u(t))

u(t)^2

(1)

G := proc (w) options operator, arrow; w*(diff(w, t)) end proc

G(h(t))

h(t)*(diff(h(t), t))

(2)

for n from 0 while n <= 6 do V[n] := (diff(F(sum(t^i*u[i], i = 0 .. n)), [`$`(t, n)]))/factorial(n); U[n] := (diff(G(sum(t^i*h[i], i = 0 .. n)), [`$`(t, n)]))/factorial(n) end do

t := 0

0

(3)

for i from 0 while i <= n-1 do A[i] := V[i]; B[i] := U[i] end do

u[0]^2

 

0

 

2*u[0]*u[1]

 

h[1]^2

 

2*u[0]*u[2]+u[1]^2

 

3*h[1]*h[2]

 

2*u[0]*u[3]+2*u[1]*u[2]

 

4*h[1]*h[3]+2*h[2]^2

 

2*u[0]*u[4]+2*u[1]*u[3]+u[2]^2

 

5*h[1]*h[4]+5*h[2]*h[3]

 

2*u[0]*u[5]+2*u[1]*u[4]+2*u[2]*u[3]

 

6*h[1]*h[5]+6*h[2]*h[4]+3*h[3]^2

 

2*u[0]*u[6]+2*u[1]*u[5]+2*u[2]*u[4]+u[3]^2

 

7*h[1]*h[6]+7*h[2]*h[5]+7*h[3]*h[4]

(4)

for j from 0 while j <= n-1 do u[0] := 1; u[j+1] := int(x*B[j], x)+int(A[j], x) end do

1

 

x

 

1

 

(1/2)*x^2*h[1]^2+x^2

 

1

 

(3/2)*x^2*h[1]*h[2]+(1/3)*x^3*h[1]^2+x^3

 

1

 

(1/2)*x^2*(4*h[1]*h[3]+2*h[2]^2)+x^3*h[1]*h[2]+(1/6)*x^4*h[1]^2+(1/2)*x^4+(1/2)*((1/2)*h[1]^2+1)*x^4

 

1

 

(1/2)*x^2*(5*h[1]*h[4]+5*h[2]*h[3])+(1/3)*x^3*(4*h[1]*h[3]+2*h[2]^2)+(5/4)*x^4*h[1]*h[2]+(1/15)*x^5*h[1]^2+(1/5)*x^5+(1/5)*((1/2)*h[1]^2+1)*x^5+(2/5)*((1/3)*h[1]^2+1)*x^5+(1/5)*((1/2)*h[1]^2+1)^2*x^5

 

1

 

(1/2)*x^2*(6*h[1]*h[5]+6*h[2]*h[4]+3*h[3]^2)+(1/3)*x^3*(5*h[1]*h[4]+5*h[2]*h[3])+(1/6)*x^4*(4*h[1]*h[3]+2*h[2]^2)+(9/10)*x^5*h[1]*h[2]+(1/45)*x^6*h[1]^2+(1/15)*x^6+(1/15)*((1/2)*h[1]^2+1)*x^6+(2/15)*((1/3)*h[1]^2+1)*x^6+(1/15)*((1/2)*h[1]^2+1)^2*x^6+(1/3)*((5/12)*h[1]^2+1)*x^6+(1/2)*(2*h[1]*h[3]+h[2]^2)*x^4+(1/3)*((1/2)*h[1]^2+1)*((1/3)*h[1]^2+1)*x^6+(3/5)*((1/2)*h[1]^2+1)*h[1]*h[2]*x^5

 

1

 

(1/2)*x^2*(7*h[1]*h[6]+7*h[2]*h[5]+7*h[3]*h[4])+(1/3)*x^3*(6*h[1]*h[5]+6*h[2]*h[4]+3*h[3]^2)+(1/6)*x^4*(5*h[1]*h[4]+5*h[2]*h[3])+(1/15)*x^5*(4*h[1]*h[3]+2*h[2]^2)+(43/60)*x^6*h[1]*h[2]+(2/315)*x^7*h[1]^2+(2/105)*x^7+(2/105)*((1/2)*h[1]^2+1)*x^7+(4/105)*((1/3)*h[1]^2+1)*x^7+(2/105)*((1/2)*h[1]^2+1)^2*x^7+(2/21)*((5/12)*h[1]^2+1)*x^7+(1/5)*(2*h[1]*h[3]+h[2]^2)*x^5+(2/21)*((1/2)*h[1]^2+1)*((1/3)*h[1]^2+1)*x^7+(8/15)*((1/2)*h[1]^2+1)*h[1]*h[2]*x^6+(2/7)*((3/10)*h[1]^2+4/5+(1/5)*((1/2)*h[1]^2+1)^2)*x^7+(2/5)*((4/3)*h[1]*h[3]+(2/3)*h[2]^2)*x^5+(1/2)*((5/2)*h[1]*h[4]+(5/2)*h[2]*h[3])*x^4+(2/7)*((1/2)*h[1]^2+1)*((5/12)*h[1]^2+1)*x^7+(2/5)*((1/2)*h[1]^2+1)*(2*h[1]*h[3]+h[2]^2)*x^5+(1/7)*((1/3)*h[1]^2+1)^2*x^7+(1/2)*h[1]*h[2]*((1/3)*h[1]^2+1)*x^6+(9/20)*h[1]^2*h[2]^2*x^5

(5)

y := sum(u[l], l = 0 .. n-1)

1+x+x^3*h[1]*h[2]+(3/5)*((1/2)*h[1]^2+1)*h[1]*h[2]*x^5+(1/5)*((1/2)*h[1]^2+1)^2*x^5+(1/3)*x^3*(4*h[1]*h[3]+2*h[2]^2)+(1/15)*x^5*h[1]^2+(1/5)*((1/2)*h[1]^2+1)*x^5+(2/5)*((1/3)*h[1]^2+1)*x^5+(1/2)*x^2*(5*h[1]*h[4]+5*h[2]*h[3])+(1/2)*((1/2)*h[1]^2+1)*x^4+(1/2)*x^2*(4*h[1]*h[3]+2*h[2]^2)+(1/6)*x^4*h[1]^2+(1/3)*x^3*h[1]^2+(1/2)*x^2*h[1]^2+(1/15)*x^6+(1/15)*((1/2)*h[1]^2+1)*x^6+(2/15)*((1/3)*h[1]^2+1)*x^6+(1/15)*((1/2)*h[1]^2+1)^2*x^6+(1/3)*((5/12)*h[1]^2+1)*x^6+(1/2)*(2*h[1]*h[3]+h[2]^2)*x^4+(1/2)*x^2*(6*h[1]*h[5]+6*h[2]*h[4]+3*h[3]^2)+(1/3)*x^3*(5*h[1]*h[4]+5*h[2]*h[3])+(1/6)*x^4*(4*h[1]*h[3]+2*h[2]^2)+(1/45)*x^6*h[1]^2+(1/5)*x^5+(1/2)*x^4+x^3+x^2+(9/10)*x^5*h[1]*h[2]+(1/3)*((1/2)*h[1]^2+1)*((1/3)*h[1]^2+1)*x^6+(3/2)*x^2*h[1]*h[2]+(5/4)*x^4*h[1]*h[2]

(6)

NULL

``


 

Download adom.mw

ie just substitute the solutions obtained by fsolve() back into the original expression - the answer *ought* to be zero. In fact one gets O(10^-15) for both solutions - close enough to zero for me!

See the attached


 

restart

Digits := 16

P := -(9958.466892*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+2.439889255))*(-0.1557978257e-4*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.261007e-4*k-9.0*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)-4.48946*10^(-11)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6-2.26*10^(-15)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7+1.899324*10^(-16)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+1.899324*10^(-16)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+0.2699913289e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k+2.83*10^(-16)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+0.155261e-4*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.1910578434e-3*lambda^4-1.519459*10^(-15)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7+2.29*10^(-15)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7-2.26342*10^(-15)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7+2.171377*10^(-10)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5-6.10984*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)-1.144560151*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4+0.2875578036e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)+0.106975e-4*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-2.86369*10^(-16)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+0.1981472958e-3*lambda^3+0.2841557560e-4*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)+1.150803103*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4+1.899324*10^(-16)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+7.28416*10^(-11)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5+1.14719*10^(-6)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4+6.11214955*10^(-6)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)-1.14257*10^(-6)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4-4.82063*10^(-11)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5-2.26342*10^(-15)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7+1.807661*10^(-11)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6+8.9899*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)+8.9599*10^(-6)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)-7.64058733*10^(-7)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4+4.55915*10^(-6)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3+2.83*10^(-16)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+2.29495*10^(-15)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7+2.83*10^(-16)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+1.445217*10^(-10)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5-1.519459*10^(-15)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7-0.1674000840e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.1833461551e-4*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda-4.605558319*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3+1.140719237*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4-3.056762083*10^(-6)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3+0.183311e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda-2.26*10^(-15)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7-1.519459*10^(-15)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7+2.83*10^(-16)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8-2.86*10^(-16)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+4.607967783*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3-9.3627*10^(-6)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)-0.835512256e-4*lambda^2-2.168014321*10^(-10)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5-0.2863334102e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)-7.637931745*10^(-7)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4-1.805990298*10^(-11)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6+3.055990782*10^(-6)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3+0.1650484496e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.2642338092e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*k+6.110608393*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)+2.29*10^(-15)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7-7.2*10^(-11)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5+7.19049*10^(-11)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5-4.559112439*10^(-6)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3-0.158580e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-2.687022860*10^(-11)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6+4.81577*10^(-11)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5-0.1069489149e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.16e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+4.49704*10^(-11)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6-2.16324*10^(-10)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5-1.14560*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4-3.010540298*10^(-11)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6+0.1650524630e-4*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.1069507987e-4*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.663330427e-4*lambda^5-3.054641904*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3+7.64564268*10^(-7)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4+0.106924e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+7.632879155*10^(-7)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4+2.169902*10^(-10)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5-0.2660838513e-4*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k+3.012211408*10^(-11)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6+4.534365311*10^(-11)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6-1.519459*10^(-15)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7-2.86*10^(-16)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+1.899324*10^(-16)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8-1.445703114*10^(-10)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5-2.86369*10^(-16)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^8+2.29495*10^(-15)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^7+2.72995*10^(-11)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6-0.2565264181e-4-6.11292*10^(-6)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)-9.3922*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)+4.555659255*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3-2.723097*10^(-11)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6-0.1833342214e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*lambda-1.150701960*10^(-6)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4+2.69309794*10^(-11)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6+1.14531*10^(-6)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^4+0.16e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+3.055413*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*lambda*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3+0.3073879707e-4*lambda-8.931240077*10^(-6)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)-4.610017127*10^(-6)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3-4.555918*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*k*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3-7.2367*10^(-11)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^5+9.4151*10^(-6)*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)-4.54*10^(-11)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^6+4.611637585*10^(-6)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^3)/((0.6307162107e-4*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.2522864843e-3*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)+0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-7.999243141*exp(0.1576790527e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-0.4450487932e-3*lambda^5+0.1300695240e-2*lambda^4-0.1345488383e-2*lambda^3+0.5598667540e-3*lambda^2-0.8455621308e-4*lambda+0.1614703348e-3)-0.1780195173e-2*lambda^5+0.5202780960e-2*lambda^4-0.5381953532e-2*lambda^3+0.2239467016e-2*lambda^2-0.3382248522e-3*lambda+8.000645881)*((7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-28.22497888*lambda^5+82.49004656*lambda^4-85.33082616*lambda^3+35.50672993*lambda^2-5.362552072*lambda+10.24044298)*(0.6307162107e-4*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2-1.999873857*exp(0.6307162107e-4*(7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+0.1261432421e-3)+2.000126143)*((7.056244720*lambda^5-20.62251164*lambda^4+21.33270654*lambda^3-8.876682482*lambda^2+1.340638018*lambda+.4398892548)^2+2))

newP:=eval(P,[k=0.1]):

plot(newP,lambda=-1..1);

 

Digits := 30; sols := fsolve(newP, lambda = -1 .. 1, maxsols = 3)

-.329543248729246670859214244152, -.333666875089007712748988551007

(1)

evalf(eval(newP, lambda = sols[1])); evalf(eval(newP, lambda = sols[2]))

-0.324354778471225210895876344743e-15

 

-0.525926830329962261065920595552e-14

(2)

 


 

Download resid.mw

1 2 3 4 5 6 7 Last Page 1 of 143