9 years, 91 days

## @Preben Alsholm  Thanks, I underst...

@Preben Alsholm

Thanks, I understand now.

## @vv I don't understand your ans...

I know the difference between sum and add, but using sum in the definition of S works perfectly well in Maple 2015 (the version I used in my comment) and Maple 2021 (I checked it right now).

So why did you make this answer? Does S := (N, x) -> sum(...) no longer work in Maple 2023?

## @acer  Great, than you very much...

@acer

Great, than you very much

## @Carl Love  "It's obvious...

@Carl Love

"It's obvious (to me at least) ..."
I guess I have to get rid of my by crystal ball and buy a new one :-)

## @acer  Thanks, it's clear now...

@acer

Thanks, it's clear now

## Great...

I vote up... even if I do not understand what really happens.
In

```Int(unapply(eval(op(1,ig),y=Y),x), rhs(op(2,ig)))
```

what makes Maple recognize that the integration has to be done with respect of x and not Y?

Why does the following lines generate an error?

```F := Y->evalf(Int(unapply(eval(op(1,ig),y=Y),x), x=rhs(op(2,ig)))):
CodeTools:-Usage(plot(F, 0 .. 0.25, size = [400, 300]));
```

@Scot Gould

F...g great!
I vote up.

## @nm  Thanks, I will try to build a...

@nm

Thanks, I will try to build a simple example that presents the issue.

Sleep on it.

## @nm Unfortunately, I'm not ready to...

@nm

Unfortunately, I'm not ready to provide a simple example at the moment (that would require pruning a fairly large code to extract the significant part).
What I suggest is that you delay ( :-) ) my question by deleting it and coming back to the site later with more solid material.
Do you mind if I delete it?

## Use the big green up-arrow in the menu b...

[moderator: You can also upload and attach one or more data files. You can put them in a .zip file if the Mapleprimes file-manager doesn't accept their filename extension.]

## @Thomas Dean Why do you talk about ...

Why do you talk about Maplet and where the message in your initial question comes from?
I don't see any Maplet command  in your code.

## There is no Maple restriction.But to hav...

There is no Maple restriction.

But having already encountered this problem in my professional activities I can tell you that since Windows10 such a limitation is imposed by the OS (and defined by the value [that you can change] of variable MAX_PATH).
Neither Mac OSX not Linux impose a limitation to the lenth of a path.

## First point: replace your last line by t...

First point: replace your last line by this one

`obj := add((stress[i]-true_stress[i])^2, i = 1 .. 10)`

Next it would be usefull you provode ranges of variation for the seven parameters (G1,G2,G3,tau1,tau2,tau3, strain) for a crude attempt to minimize obj lead to non numeric values.

## Matrix M corrected...

You will find in the attached file:

• A correct construction of M (if I'm not mistaken).

• A synthetic representation of its characteristic polynomia (formula (6), valid for any value of N).

• The expression CharacteristicPolynomial provides and a few ways to express this lengthy formula in a more synthetic form (while less tractable than (formula (6))
 > restart
 > with(LinearAlgebra):
 > V := (N, s) -> Vector(N, symbol=s): J := N -> IdentityMatrix(N):
 > n := 4: M := I *~ (              DiagonalMatrix( < -2*lambda, V(n, a) > )              +             (lambda+m__0) *~ IdentityMatrix(n+1)           ): M[n+1, 1..n] := -V(n, c)^+: M[1..n, n+1] :=  V(n, c): M

A pretty formula for the characteristic polynomial

 > # Step 0: define X this way X := eta *~ IdentityMatrix(n+1) - eval(M, lambda=theta-m__0)
 (1)
 > # Step 1: write each diagonal element this way for i from 1 to n+1 do   X[i, i] := eta-u[i] end do: X;
 (2)
 > # Step 2: look to thexhape of the minots of W wrt to its rightmost column for i from 1 to n+1 do   Minor(X, i, n+1) * X[i, n+1] * (-1)^(i-1) end do;
 (3)
 > # Step 3: then the determinant of X writes det := add(Minor(X, i, n+1) * X[i, n+1] * (-1)^(i-1), i=1..n+1);
 (4)
 > # Step 4: simplify this expression bt setting Z[i] = eta-u[i] expand( eval(det, [seq(eta-u[i]=Z[i], i=1..n+1)]) / mul(Z[i], i=1..n+1) );
 (5)
 > # Step 5: Thus this representation of the characteristic polynomial as a rational fraction det := (-1)^'n' * Product(Z[k], k=1..'n'+1) * (1 + Sum(c[k]^2/Z[k]/Z[k+1], k=1..'n')); print(): k := 'k': reminder := Z[k] = eval(eta-u[k], u[k] = 'M[k, k]');
 (6)

A direct use of  CharacteristicPolynomial

 > # With CharacteristicPolynomial: CP := CharacteristicPolynomial(eval(X, eta=0), eta);
 (7)
 > # A more synthetic form with(LargeExpressions): Synthetic_form := collect(CP, eta, Veil[T]);
 (8)
 > # Where the coefficients are: Coefficients_are := [ seq(T[i] = Unveil[T](T[i]), i=1..LastUsed[T]) ]: print~(Coefficients_are):
 (9)

 > # In these expressions of T[i] we recognize: T[1] = Determinant(eval(X, eta=0)); T[2] = -Trace(eval(X, eta=0));; T[3] = - expand( 1/2*(Trace(eval(X, eta=0)^2) - Trace(eval(X, eta=0))^2) )
 (10)
 > # and so on, those are classical formulas.