Question: Optimization

What's wrong? 
Should I use for this function NLPSolve?

restart;
with(Optimization);
print(`output redirected...`); # input placeholder
  [ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize, NLPSolve,
    QPSolve]
infolevel[Optimization] := 3;
data := Matrix(10, 2, {(1, 1) = 0, (1, 2) = 0., (2, 1) = 1, (2, 2) = 2.0, (3, 1) = 2, (3, 2) = 7.29, (4, 1) = 3, (4, 2) = 13.72, (5, 1) = 4, (5, 2) = 21.92, (6, 1) = 5, (6, 2) = 32.57, (7, 1) = 6, (7, 2) = 35.48, (8, 1) = 7, (8, 2) = 50.11, (9, 1) = 8, (9, 2) = 57.67, (10, 1) = 9, (10, 2) = 82.47});
z := proc (x) options operator, arrow; A*x^b end proc;
        b
x -> A x
guess := [A = 2, b = 2];
                               [A = 2, b = 2]
f := proc (x, y) y[1] = x^b; y[2] = A*x^b*ln(x) end proc;

X := data[1 .. (), 1]; Y := data[1 .. (), 2];
res := convert(`~`[`-`](Y, `~`[z](X)), list);
    [                       b             b             b             b  
    [0., 2.0 - A, 7.29 - A 2 , 13.72 - A 3 , 21.92 - A 4 , 32.57 - A 5 ,
                 b             b             b             b]
      35.48 - A 6 , 50.11 - A 7 , 57.67 - A 8 , 82.47 - A 9 ]
Res := proc (X, Y) local j; for j to N do Y[j] := z(X[j])-data[j, 2] end do end proc;
 
N := LinearAlgebra:-RowDimension(data);
                                     10
LSSolve([2, N], Res, objectivejacobian = f, initialpoint = `<,>`(2.0, 2.0));
LSSolve: calling nonlinear LS solver
LSSolve: using method=modifiednewton
LSSolve: number of problem variables 2
LSSolve: number of residuals 10
LSSolve: optimality tolerance set to 0.3256082241e-11
LSSolve: iteration limit set to 800
LSSolve: trying evalhf mode
LSSolve: trying evalf mode
Error, (in Optimization:-LSSolve) could not store A*2.^b in a floating-point rtable

LSSolve([2, N], Res, method = sqp, initialpoint = `<,>`(2.0, 2.0));
LSSolve: calling nonlinear LS solver
LSSolve: using method=sqp
LSSolve: number of problem variables 2
LSSolve: number of residuals 10
LSSolve: number of nonlinear inequality constraints 0
LSSolve: number of nonlinear equality constraints 0
LSSolve: number of general linear constraints 0
LSSolve: feasibility tolerance set to 0.1053671213e-7
LSSolve: optimality tolerance set to 0.3256082241e-11
LSSolve: iteration limit set to 50
LSSolve: infinite bound set to 0.10e21
LSSolve: trying evalhf mode
LSSolve: trying evalf mode
Error, (in Optimization:-LSSolve) could not store A*2.^b in a floating-point rtable
Gracias
HerClau
Please Wait...