stefano91

20 Reputation

One Badge

9 years, 56 days

MaplePrimes Activity


These are replies submitted by stefano91

@Carl Love 

Okok,

but I think there is a further error in my spreadsheet, becouse if I "execute" calculation:

GlobalOptima(Fm(x),[x=0..Xa],Maximize)

Error, (in psi2) invalid input: KelvinBer expects its 2nd argument, x, to be of type algebraic, but received 0 .. Xa.

Furthermore, completed this calculation, I would like to know if maple can automatically take  v, Q3, Xa to excel cells and give me back into other cell max (Fm (x) ....

Thank you for your patience, but I'm considering the purchase of a license for my company and I have to be sure that execute these calculations.

@Carl Love 

ok, I installed DirectSearch but I have an error  in file attached


v := .3

.3

(1)

Xa := 5

5

(2)

Q3 := -.1

-.1

(3)

x := 0 .. Xa

0 .. 5

(4)

psi1 := proc (x) options operator, arrow; KelvinBei(0, x)+(1-v)*(D[2](KelvinBer))(0, x)/x end proc

proc (x) options operator, arrow; KelvinBei(0, x)+(1-v)*(D[2](KelvinBer))(0, x)/x end proc

(5)

psi2 := proc (x) options operator, arrow; KelvinBer(0, x)-(1-v)*(D[2](KelvinBei))(0, x)/x end proc

proc (x) options operator, arrow; KelvinBer(0, x)-(1-v)*(D[2](KelvinBei))(0, x)/x end proc

(6)

Za := evalf((D[2](KelvinBei))(0, Xa)*psi2(Xa)-(D[2](KelvinBer))(0, Xa)*psi1(Xa))

22.84852158

(7)

Zd := evalf((KelvinBer(0, Xa)*psi2(Xa)+KelvinBei(0, Xa)*psi1(Xa))/(Xa^3*Za))

0.1224313550e-1

(8)

Zv := evalf(((D[2](KelvinBer))(0, Xa)*psi2(Xa)+(D[2](KelvinBei))(0, Xa)*psi1(Xa))/(Xa^2*Za))

0.4105570156e-1

(9)

Zw := evalf(((D[2](KelvinBer))(0, Xa)*KelvinBer(0, Xa)+(D[2](KelvinBei))(0, Xa)*KelvinBei(0, Xa))/(Xa^2*Za))

0.4105570156e-1

(10)

Zm := evalf(((D[2](KelvinBer))(0, Xa)^2+(D[2](KelvinBei))(0, Xa)^2)/(Xa*Za))

.2953816961

(11)

Qm := proc (x) options operator, arrow; ((D[2](KelvinBei))(0, Xa)*psi2(x)-(D[2](KelvinBer))(0, Xa)*psi1(x))/Za end proc

proc (x) options operator, arrow; ((D[2](KelvinBei))(0, Xa)*psi2(x)-(D[2](KelvinBer))(0, Xa)*psi1(x))/Za end proc

(12)

Qv := proc (x) options operator, arrow; (psi1(Xa)*psi2(x)-psi2(Xa)*psi1(x))/(Xa*Za) end proc

proc (x) options operator, arrow; (psi1(Xa)*psi2(x)-psi2(Xa)*psi1(x))/(Xa*Za) end proc

(13)

Fm := proc (x) options operator, arrow; (1/2)*Qv(x)+(1/2)*Q3*Qm(x) end proc

proc (x) options operator, arrow; (1/2)*Qv(x)+(1/2)*Q3*Qm(x) end proc

(14)

with(DirectSearch)

[BoundedObjective, CompromiseProgramming, DataFit, ExponentialWeightedSum, GlobalOptima, GlobalSearch, Minimax, ModifiedTchebycheff, Search, SolveEquations, WeightedProduct, WeightedSum]

(15)

"GlobalOptima(Fm(x),[x=0.. Xa],maximize)[1])"

Error, unable to match delimiters

"GlobalOptima(Fm(x),[x=0.. Xa],maximize)[1])"

 

Zd2 := proc (x) options operator, arrow; x*(KelvinBer(0, x)*psi2(Xa)+KelvinBei(0, x)*psi1(Xa))/(Xa^3*Za) end proc

proc (x) options operator, arrow; x*(KelvinBer(0, x)*psi2(Xa)+KelvinBei(0, x)*psi1(Xa))/(Xa^3*Za) end proc

(16)

Zw2 := proc (x) options operator, arrow; ((D[2](KelvinBer))(0, Xa)*KelvinBer(0, x)+(D[2](KelvinBei))(0, Xa)*KelvinBei(0, x))/(Xa^2*Za) end proc

proc (x) options operator, arrow; ((D[2](KelvinBer))(0, Xa)*KelvinBer(0, x)+(D[2](KelvinBei))(0, Xa)*KelvinBei(0, x))/(Xa^2*Za) end proc

(17)

Ft := proc (x) options operator, arrow; (1/16)*(Zd2(x)+Zw2(x)*Q3)*Xa^4 end proc

proc (x) options operator, arrow; (1/16)*(Zd2(x)+Zw2(x)*Q3)*Xa^4 end proc

(18)

``

``


Download UHX13.1-13.2.mw

The same min and max I need for Ft. There is a way to export maple code in excel?

 

@Carl Love 

I try to explain. I need the max and min values of a function, es: f(x)=x^0.5  0<x<3

min f(0)=0

max F(3)=1.732

It is simply the max and min global or local of a continuous function.

In this case the function's name is Fm(x) and I would like to know:

-in maple software: the wording to have global and local point of min and max;

-in excel: the same as above but in excel using maple add-in

Regarding abs... I have f(x), min f(x)= -5 ----->     abs(min(f(x))= abs(-5)=5

I only want to calculate min and max of function and in case these are negative, replacing with +

@Carl Love 

@Markiyan Hirnyk 6939

 

Thank you all,

I have one last question:

-I define 2 function Qm and Qv, I use these in another function, but results show parameter in results, I need numeric values!!! How can I do?

=maple("Fm:=x->(Qv+&1*Qm)/2";B3)

=maple("G:=map(g->evalf(eval(Fm(x),x=g)),[A])")------->

results: G:=[0.5*Qv+.3665e-1*Qm,....] I need a number!!

In attached excel file, the new formula with numeric values I need is Fm(x)UHX-13_02.xlsx

Bye!

 

Page 1 of 1