MaplePrimes Questions

Hi All,

I have problem how to formulate optimization problem with additional parameters.
For example let objective function is as follow:

ObjF:=proc(x,Delta)
    return sin(x) + cos(x) + Delta;
end proc;

In Matlab we can formulate the following optimization problem:

Delta = 10;
f=@(x)ObjF(x,Delta);
options = optimset('Algorithm','interior-point');
x = fmincon(f,0.1,[1;2],[],[],[],[],[],[],options);

where:

function y = ObjF(x,Delta)
    y = sin(x) + cos(x) + Delta;
end

In above example I can pass additional parameters (Delta) to objective function an then I can start optimization
to find solution. How to define above problem in Maple ? How to pass additional  parameters  befor we starat the optymalization?


Best,

Rariusz

When a list is so big, full combination can not be calculated in limited time

is there any skill to split into small combinations when use with combination packages?

originally I can use for loop to do this 

but it need to refactor code in order to write well in generic style. 

Is there another skill to use combination package instead of for loop

I have a function that is defined by a proc command including some conditional statements (if ... then ...). The conditions are so long so that I can not use a piecewise function instead of using proc. The commands in my code are long and I simplify my question as follows:
f := proc(x) local r; r := sin(x)+x*cos(x); if abs(r) < 1/2 then sin(x) else cos(x) end if; end proc;

plot('f'(x), x = -1 .. 1) works fine but the command int(('f')(x), x = -1 .. 1) gives an error:
Error, (in f) cannot determine if this expression is true or false: abs(sin(x)+x*cos(x)) < 1/2

Is there any way (except rewriting the function as a piecewise function) to get rid of the error? 

Any help is appreciated.

#my testing for wildcard to one
#after testing, it loop a very long time and not stop
ppp := [[0,0,0,x],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
check1 := [seq(0,ii=1..nops(ppp))];
ttt1 := [[0,0,0,1],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
mmmeaght1 := [seq(0,ii=1..nops(ppp[1]))]:
bbb1 := [seq(0,ii=1..nops(ppp[1]))]:
emap := [(xx) -> if [xx < 0 assuming x > 0] then 0 else 1 end if, (xx) -> evalf(1/(1+exp(xx)))]:
#trace(perceptronrule1);
MM(ppp, ttt1, mmmeaght1, bbb1, check1, emap);
 

when test wildcard variable for input, would like to assume x > 0 then

i try assuming x > 0 , got error

 

I see from here http://www.mapleprimes.com/questions/220829-How-Do-I-Write-The-Equation-Of-The-Plane to write the equation of a sphere. I tried 
restart; L := [[[0, 0, 0], [2, 0, 0], [0, 2, 0], [2, 2, 0]], [[0, 0, 0], [2, 0, 0], [0, 2, 0], [0, 0, 2]], [[0, 0, 0], [2, 0, 0], [0, 2, 0], [2, 0, 2]], [[0, 0, 0], [2, 0, 0], [0, 2, 0], [0, 2, 2]], [[0, 0, 0], [2, 0, 0], [0, 2, 0], [2, 2, 2]], [[0, 0, 0], [2, 0, 0], [2, 2, 0], [0, 0, 2]], [[0, 0, 0], [2, 0, 0], [2, 2, 0], [2, 0, 2]], [[0, 0, 0], [2, 0, 0], [2, 2, 0], [0, 2, 2]], [[0, 0, 0], [2, 0, 0], [2, 2, 0], [2, 2, 2]], [[0, 0, 0], [2, 0, 0], [0, 0, 2], [2, 0, 2]], [[0, 0, 0], [2, 0, 0], [0, 0, 2], [0, 2, 2]], [[0, 0, 0], [2, 0, 0], [0, 0, 2], [2, 2, 2]], [[0, 0, 0], [2, 0, 0], [2, 0, 2], [0, 2, 2]], [[0, 0, 0], [2, 0, 0], [2, 0, 2], [2, 2, 2]], [[0, 0, 0], [2, 0, 0], [0, 2, 2], [2, 2, 2]], [[0, 0, 0], [0, 2, 0], [2, 2, 0], [0, 0, 2]], [[0, 0, 0], [0, 2, 0], [2, 2, 0], [2, 0, 2]], [[0, 0, 0], [0, 2, 0], [2, 2, 0], [0, 2, 2]], [[0, 0, 0], [0, 2, 0], [2, 2, 0], [2, 2, 2]], [[0, 0, 0], [0, 2, 0], [0, 0, 2], [2, 0, 2]], [[0, 0, 0], [0, 2, 0], [0, 0, 2], [0, 2, 2]], [[0, 0, 0], [0, 2, 0], [0, 0, 2], [2, 2, 2]], [[0, 0, 0], [0, 2, 0], [2, 0, 2], [0, 2, 2]], [[0, 0, 0], [0, 2, 0], [2, 0, 2], [2, 2, 2]], [[0, 0, 0], [0, 2, 0], [0, 2, 2], [2, 2, 2]], [[0, 0, 0], [2, 2, 0], [0, 0, 2], [2, 0, 2]], [[0, 0, 0], [2, 2, 0], [0, 0, 2], [0, 2, 2]], [[0, 0, 0], [2, 2, 0], [0, 0, 2], [2, 2, 2]], [[0, 0, 0], [2, 2, 0], [2, 0, 2], [0, 2, 2]], [[0, 0, 0], [2, 2, 0], [2, 0, 2], [2, 2, 2]], [[0, 0, 0], [2, 2, 0], [0, 2, 2], [2, 2, 2]], [[0, 0, 0], [0, 0, 2], [2, 0, 2], [0, 2, 2]], [[0, 0, 0], [0, 0, 2], [2, 0, 2], [2, 2, 2]], [[0, 0, 0], [0, 0, 2], [0, 2, 2], [2, 2, 2]], [[0, 0, 0], [2, 0, 2], [0, 2, 2], [2, 2, 2]], [[2, 0, 0], [0, 2, 0], [2, 2, 0], [0, 0, 2]], [[2, 0, 0], [0, 2, 0], [2, 2, 0], [2, 0, 2]], [[2, 0, 0], [0, 2, 0], [2, 2, 0], [0, 2, 2]], [[2, 0, 0], [0, 2, 0], [2, 2, 0], [2, 2, 2]], [[2, 0, 0], [0, 2, 0], [0, 0, 2], [2, 0, 2]], [[2, 0, 0], [0, 2, 0], [0, 0, 2], [0, 2, 2]], [[2, 0, 0], [0, 2, 0], [0, 0, 2], [2, 2, 2]], [[2, 0, 0], [0, 2, 0], [2, 0, 2], [0, 2, 2]], [[2, 0, 0], [0, 2, 0], [2, 0, 2], [2, 2, 2]], [[2, 0, 0], [0, 2, 0], [0, 2, 2], [2, 2, 2]], [[2, 0, 0], [2, 2, 0], [0, 0, 2], [2, 0, 2]], [[2, 0, 0], [2, 2, 0], [0, 0, 2], [0, 2, 2]], [[2, 0, 0], [2, 2, 0], [0, 0, 2], [2, 2, 2]], [[2, 0, 0], [2, 2, 0], [2, 0, 2], [0, 2, 2]], [[2, 0, 0], [2, 2, 0], [2, 0, 2], [2, 2, 2]], [[2, 0, 0], [2, 2, 0], [0, 2, 2], [2, 2, 2]], [[2, 0, 0], [0, 0, 2], [2, 0, 2], [0, 2, 2]], [[2, 0, 0], [0, 0, 2], [2, 0, 2], [2, 2, 2]], [[2, 0, 0], [0, 0, 2], [0, 2, 2], [2, 2, 2]], [[2, 0, 0], [2, 0, 2], [0, 2, 2], [2, 2, 2]], [[0, 2, 0], [2, 2, 0], [0, 0, 2], [2, 0, 2]], [[0, 2, 0], [2, 2, 0], [0, 0, 2], [0, 2, 2]], [[0, 2, 0], [2, 2, 0], [0, 0, 2], [2, 2, 2]], [[0, 2, 0], [2, 2, 0], [2, 0, 2], [0, 2, 2]], [[0, 2, 0], [2, 2, 0], [2, 0, 2], [2, 2, 2]], [[0, 2, 0], [2, 2, 0], [0, 2, 2], [2, 2, 2]], [[0, 2, 0], [0, 0, 2], [2, 0, 2], [0, 2, 2]], [[0, 2, 0], [0, 0, 2], [2, 0, 2], [2, 2, 2]], [[0, 2, 0], [0, 0, 2], [0, 2, 2], [2, 2, 2]], [[0, 2, 0], [2, 0, 2], [0, 2, 2], [2, 2, 2]], [[2, 2, 0], [0, 0, 2], [2, 0, 2], [0, 2, 2]], [[2, 2, 0], [0, 0, 2], [2, 0, 2], [2, 2, 2]], [[2, 2, 0], [0, 0, 2], [0, 2, 2], [2, 2, 2]], [[2, 2, 0], [2, 0, 2], [0, 2, 2], [2, 2, 2]], [[0, 0, 2], [2, 0, 2], [0, 2, 2], [2, 2, 2]]];
getEq := proc (L1::listlist) local p, S, expr; seq(geom3d:-point(p || j, L1[j]), j = 1 .. 4); geom3d:-Equation(geom3d:-sphere(S, [p1, p2, p3, p4], [x, y, z])) end proc; map(getEq, L);

But I couldn't get the result. How can get the result?


 

I am practicing with some diff equations. I am having problem solving for one of the constants. I am having a pproblem assigning a value to derivatives or 2nd derivatives. What is a good general technique is this type of situation?
 

restart

NULL

``

omega^2 = g/l

omega^2 = g/l

(1)

Eq1 := diff(Theta(t), t, t) = -omega^2*Theta(t)

diff(diff(Theta(t), t), t) = -omega^2*Theta(t)

(2)

ics := Theta(0) = 0, (diff(Theta(t), t))(0) = Vmax, (diff(Theta(t), t, t))(0) = 0

Theta(0) = 0, (diff(Theta(t), t))(0) = Vmax, (diff(diff(Theta(t), t), t))(0) = 0

(3)

SHM := dsolve({Eq1, ics})

(4)

SHM := dsolve({Eq1})

{Theta(t) = _C1*sin(omega*t)+_C2*cos(omega*t)}

(5)

SHM := dsolve({Eq1, Theta(0) = 0})

Theta(t) = _C1*sin(omega*t)

(6)

``

diffSHM := diff(SHM, t)

diff(Theta(t), t) = _C1*omega*cos(omega*t)

(7)

``

(Theta(t))(0) = 0, (diff(Theta(t), t))(0) = V

(Theta(t))(0) = 0, (diff(Theta(t), t))(0) = V

(8)

``

``

``

``

``

NULL

NULL


 

Download SHM.mw

I was trying to write a procedure that would compute a simple linear equation using the Extended Euclidean Algorithm. I was thinking of a procedure like the following:

solveEeaMatrix := proc (a::list, b::list) 
 local c::list;  
 c := a -iquo(a[1],b[1])*b;  
 print(c);  
 while (c[1] <> gcd(a[1],b[1]) do 
 ...

I am basically stuck at this part as

1) I don't know how to setup a multi-dimensional array that could dynamically grow(as a possible solution).

2) I can't come up with a recursive function that could possibly take care of this.

In short, if I am given for example an equation like: 84*x+203*y = 14

I will transform it into 2 linear equation as follow:
row0 := [203, 0, 1] row1 := [84, 1, 0] Subsequently, I will perform the following:

c := a -iquo(a[1],b[1])*b;  

Where aand b are both lists and arguments of the procedure and cbeing another list and a local variable.

But I don't know how to do the following programmatically:

row3 := row1-iquo(row1[1], row2[1])*row2;
row4 := row2-iquo(row2[1], row3[1])*row3;
row5 := row3-iquo(row3[1], row4[1])*row4;
and so on ...                  

Any hint would be appreciated.

I have expression h1 as below:

 

 

 

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman

 

restart

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman

 

"`u__1`(`xi__1`,`xi__2`,Zeta,t):=`u__0`(`xi__1`,`xi__2`,Zeta,t)+Zeta*`phi__1`(`xi__1`,`xi__2`,t):"

"`u__2`(`xi__1`,`xi__2`,Zeta,t):=`v__0`(`xi__1`,`xi__2`,Zeta,t)+Zeta*`phi__2`(`xi__1`,`xi__2`,t):"

"`u__3`(`xi__1`,`xi__2`,Zeta,t):=`w__0`(`xi__1`,`xi__2`,Zeta,t):"

`&phi;__n` := (diff(v__0(`&xi;__1`, `&xi;__2`, Zeta, t)*a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)-(diff(u__0(`&xi;__1`, `&xi;__2`, Zeta, t)*a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)))/(2*a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*a__2(`&xi;__1`, `&xi;__2`, Zeta, t))

`&varepsilon;0__1` := (diff(u__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)+v__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)+a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*w__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__1)/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;0__2` := (diff(v__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)+u__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)+a__2(`&xi;__1`, `&xi;__2`, Zeta, t)*w__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__2)/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;0__4` := (diff(w__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)+a__2(`&xi;__1`, `&xi;__2`, Zeta, t)*`&phi;__2`(`&xi;__1`, `&xi;__2`, t)-a__2(`&xi;__1`, `&xi;__2`, Zeta, t)*v__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__2)/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;0__5` := (diff(w__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)+a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*`&phi;__1`(`&xi;__1`, `&xi;__2`, t)-a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*u__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__1)/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)

`&omega;0__1` := (diff(v__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)-u__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)-`&phi;__n`

`&omega;0__2` := (diff(u__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)-v__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)+`&phi;__n`

`&varepsilon;1__1` := (diff(`&phi;__1`(`&xi;__1`, `&xi;__2`, t), `&xi;__1`)+`&phi;__2`(`&xi;__1`, `&xi;__2`, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;1__2` := (diff(`&phi;__2`(`&xi;__1`, `&xi;__2`, t), `&xi;__2`)+`&phi;__1`(`&xi;__1`, `&xi;__2`, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)

`&omega;1__1` := (diff(`&phi;__2`(`&xi;__1`, `&xi;__2`, t), `&xi;__1`)+`&phi;__1`(`&xi;__1`, `&xi;__2`, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)-`&phi;__n`/R

`&omega;1__2` := (diff(`&phi;__1`(`&xi;__1`, `&xi;__2`, t), `&xi;__2`)+`&phi;__2`(`&xi;__1`, `&xi;__2`, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)+`&phi;__n`/R

`&varepsilon;__1` := (Zeta*`&varepsilon;1__1`+`&varepsilon;0__1`)/(1+Zeta/R__1)

`&varepsilon;__2` := (Zeta*`&varepsilon;1__2`+`&varepsilon;0__2`)/(1+Zeta/R__2)

`&varepsilon;__4` := `&varepsilon;0__4`/(1+Zeta/R__2)

`&varepsilon;__5` := `&varepsilon;0__5`/(1+Zeta/R__1)

`&varepsilon;__6` := (Zeta*`&omega;1__1`+`&omega;0__1`)/(1+Zeta/R__1)+(Zeta*`&omega;1__2`+`&omega;0__2`)/(1+Zeta/R__2)

epsilon := Matrix([[`&varepsilon;__1`], [`&varepsilon;__2`], [`&varepsilon;__4`], [`&varepsilon;__5`], [`&varepsilon;__6`]])

with(LinearAlgebra)

e__1 := Matrix([[0, 0, 0, e1__15, 0], [0, 0, e1__24, 0, 0], [e1__31, e1__31, 0, 0, 0]])

e__5 := Matrix([[0, 0, 0, e5__15, 0], [0, 0, e5__24, 0, 0], [e5__31, e5__31, 0, 0, 0]])

E__1 := -Matrix([[diff(`&varphi;1`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__1`)], [diff(`&varphi;1`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__2`)], [diff(`&varphi;1`(`&xi;__1`, `&xi;__2`, Zeta), Zeta)]])

E__5 := -Matrix([[diff(`&varphi;5`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__1`)], [diff(`&varphi;5`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__2`)], [diff(`&varphi;5`(`&xi;__1`, `&xi;__2`, Zeta), Zeta)]])

`&epsilon;__1` := Matrix([[`&epsilon;1__11`, 0, 0], [0, `&epsilon;1__22`, 0], [0, 0, `&epsilon;1__33`]])

`&epsilon;` := Matrix([[`&epsilon;5__11`, 0, 0], [0, `&epsilon;5__22`, 0], [0, 0, `&epsilon;5__33`]])

f := Matrix([[f1, f2, f3]])

D__1 := Multiply(e__1, epsilon)+Multiply(`&epsilon;__1`, E__1)

D__5 := Multiply(e__5, epsilon)+Multiply(`&epsilon;__5`, E__5)

h1 := simplify((Multiply(Transpose(E__1), D__1))(1))

(-R__1*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*e1__31*(R__2+Zeta)*(phi__2(xi__1, xi__2, t)*Zeta+v__0(xi__1, xi__2, Zeta, t))*(diff(a__1(xi__1, xi__2, Zeta, t), xi__2))-(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*R__2*e1__31*(R__1+Zeta)*(phi__1(xi__1, xi__2, t)*Zeta+u__0(xi__1, xi__2, Zeta, t))*(diff(a__2(xi__1, xi__2, Zeta, t), xi__1))-a__2(xi__1, xi__2, Zeta, t)*R__1*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*e1__31*(R__2+Zeta)*(diff(u__0(xi__1, xi__2, Zeta, t), xi__1))-a__1(xi__1, xi__2, Zeta, t)*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*R__2*e1__31*(R__1+Zeta)*(diff(v__0(xi__1, xi__2, Zeta, t), xi__2))-a__2(xi__1, xi__2, Zeta, t)*R__1*(diff(varphi1(xi__1, xi__2, Zeta), xi__1))*e1__15*(R__2+Zeta)*(diff(w__0(xi__1, xi__2, Zeta, t), xi__1))-a__1(xi__1, xi__2, Zeta, t)*R__2*(diff(varphi1(xi__1, xi__2, Zeta), xi__2))*e1__24*(R__1+Zeta)*(diff(w__0(xi__1, xi__2, Zeta, t), xi__2))+`&epsilon;1__33`*a__1(xi__1, xi__2, Zeta, t)*a__2(xi__1, xi__2, Zeta, t)*(R__2+Zeta)*(R__1+Zeta)*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))^2-e1__31*(a__2(xi__1, xi__2, Zeta, t)*R__1*Zeta*(R__2+Zeta)*(diff(phi__1(xi__1, xi__2, t), xi__1))+a__1(xi__1, xi__2, Zeta, t)*(R__2*Zeta*(R__1+Zeta)*(diff(phi__2(xi__1, xi__2, t), xi__2))+a__2(xi__1, xi__2, Zeta, t)*w__0(xi__1, xi__2, Zeta, t)*(R__1+R__2+2*Zeta)))*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))+a__2(xi__1, xi__2, Zeta, t)*(`&epsilon;1__11`*(R__2+Zeta)*(R__1+Zeta)*(diff(varphi1(xi__1, xi__2, Zeta), xi__1))^2-e1__15*(R__2+Zeta)*(phi__1(xi__1, xi__2, t)*R__1-u__0(xi__1, xi__2, Zeta, t))*(diff(varphi1(xi__1, xi__2, Zeta), xi__1))+(R__1+Zeta)*(`&epsilon;1__22`*(R__2+Zeta)*(diff(varphi1(xi__1, xi__2, Zeta), xi__2))-e1__24*(phi__2(xi__1, xi__2, t)*R__2-v__0(xi__1, xi__2, Zeta, t)))*(diff(varphi1(xi__1, xi__2, Zeta), xi__2)))*a__1(xi__1, xi__2, Zeta, t))/(a__1(xi__1, xi__2, Zeta, t)*a__2(xi__1, xi__2, Zeta, t)*(R__1+Zeta)*(R__2+Zeta))

(1)

NULL

``

 

 

Download simplifymore.mw

 

 

How can i simplify h1 more in Maple?

I want to calculate the intersection between three circles.
I know that in this case i can calculate intersection of only the first and second equation, but I need this for a interactive component.

The command "intersection"[GEOMETRY] work only with 2 circles.

I did this but it doesn't work.

It doesn't give me an error,but  nothing happens.

eq1: x^2+y^2-6600*x-4400*y+15717900 = 0
eq2: x^2+y^2-6820*x-4180*y+15989800 = 0
eq3: 1.966975428*10^7+x^2+y^2-7480*x-4840*y = 0

Thanks, Enrico

I used the command line betwen two poin, and i saw the graphic.

The line passes for my two point, but i I would like it started in the first point and finished in the second.

So unlike this:

Thanks, Enrico

the question is 

ODE5:= y(x)*diff(y(x),x,x) + (diff(y(x),x)^2=0

dsolve({ODE5,y(0)=4,D(y)(0)=7},y(x))

and my answer appears to be an integration! which is wrong

the correct answer : 2*(4+14*x)^(1/2)

Could someone tell me what did I do wrong? And how could I get to this result?

Thanks a lot!

 

guys, need your help. i've been trying to find 9 pamater which are psi1,psi2,psi3,m1,m2,m3,sigma1,sigma2,sigma3. I need to minimize one function. i have datas and several contraints. i will share this with you guys. Really need your help and i'll appreciate any suggestion. Thanks

data:

a(x):=qtopi[x];

this is my objective function:

fungsikerugian := sum((1-(1-(psi1*exp(-((x+1)/m1)^(m1/sigma1))+psi2*(1-exp(-((x+1)/m2)^(-m2/sigma2)))+psi3*exp(exp(-m3/sigma3)-exp((x+1-m3)/sigma3)))/(psi1*exp(-(x/m1)^(m1/sigma1))+psi2*(1-exp(-(x/m2)^(-m2/sigma2)))+psi3*exp(exp(-m3/sigma3)-exp((x-m3)/sigma3))))/a(x))^2, x = 0 .. 111);

these are my contraints

a := psi1+psi2+psi3 = 1;
         
b := 0 <= exp(-((x+1)/m1)^(m1/sigma1));
                          
c := 1 >= exp(-((x+1)/m1)^(m1/sigma1));
                       
d := 0 <= 1-exp(-((x+1)/m2)^(-m2/sigma2));
                        
e := 1 >= 1-exp(-((x+1)/m2)^(-m2/sigma2));
                 
f := 0 <= exp(exp(-m3/sigma3)-exp((x+1-m3)/sigma3));
                  
g := 1 >= exp(exp(-m3/sigma3)-exp((x+1-m3)/sigma3));
            
h := 0 <= exp(-(x/m1)^(m1/sigma1));
                        
i := 1 >= exp(-(x/m1)^(m1/sigma1));
                     
j := 0 <= 1-exp(-(x/m2)^(-m2/sigma2));
                           
k := 1 >= 1-exp(-(x/m2)^(-m2/sigma2));
                      
l := 0 <= exp(exp(-m3/sigma3)-exp((x-m3)/sigma3));
                   
m := 1 >= exp(exp(-m3/sigma3)-exp((x-m3)/sigma3));
               
n := 0 <= 1-(psi1*exp(-((x+1)/m1)^(m1/sigma1))+psi2*(1-exp(-((x+1)/m2)^(-m2/sigma2)))+psi3*exp(exp(-m3/sigma3)-exp((x+1-m3)/sigma3)))/(psi1*exp(-(x/m1)^(m1/sigma1))+psi2*(1-exp(-(x/m2)^(-m2/sigma2)))+psi3*exp(exp(-m3/sigma3)-exp((x-m3)/sigma3)));

o := 1 >= 1-(psi1*exp(-((x+1)/m1)^(m1/sigma1))+psi2*(1-exp(-((x+1)/m2)^(-m2/sigma2)))+psi3*exp(exp(-m3/sigma3)-exp((x+1-m3)/sigma3)))/(psi1*exp(-(x/m1)^(m1/sigma1))+psi2*(1-exp(-(x/m2)^(-m2/sigma2)))+psi3*exp(exp(-m3/sigma3)-exp((x-m3)/sigma3)));
 
i use this to solve that but seems to not going anywhere
NLPSolve(fungsikerugian, {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o}, assume = nonnegative);
 
Thanks

Hello people in mapleprimes,

I am using maple 2016's standard UI.
And, I write save command in the ending place there.

And, while I write a code, whenever I think I had better put a name of an expression on a list in another .mpl file, to refer it later, I scroll down the cursor to the ending of the worksheet, and write the name of the expression, and again I bring the cursor back to the place where I wrote an expression whose name I wrote among the arguments of save.
  But, this is a little inconvenient. I have to find the original place where I had been before I moved to the end of the worksheet. But, on the other hand, using a bookmark seems complicated. Isn't there any better way to go to the place of the save command, which is the end of the worksheet, and to go back to the original place soon.

I hope you will give any hint to me. Thanks in advance.

 

When I do

seq(a||i,i=1..3); Maple returns   a1, a2, a3

But  seq(a__i,i=1..3);  returns a__i, a__i, a__i

Is there a way to make the second example also return  a__1,a__2,a__3 ?

http://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet/documenting/2DMathShortcutKeys

thank you,
Maple 2016.2

 

I am not a math major, so may be I am missing something here. But for this ode:

(diff(y(x),x))^2=4 * y(x)

There ought to be (I think) 2 solutions (other than the singular one y(x)=0), due to the square root. i.e the ode becomes

   diff(y(x),x)= +-  2* sqrt(y(x))

So for the + case, there is one solution, and for the - case, there is another solution. But Maple dsolve only gives one solution (again, ignoring the singular solution for now):

eq:=(diff(y(x),x))^2=4 * y(x);
sol:=dsolve(eq,y(x));

     y(x) = _C1^2-2*_C1*x+x^2

In Mathematica, it gives both solutions

ode = (y'[x])^2 == 4 y[x];
DSolve[ode, y[x], x] // Simplify
    {  {y[x] -> (1/4)*(-2*x + C[1])^2},   {y[x] -> (1/4)*(2*x + C[1])^2}}

Both Maple and Mathematica solutions are correct ofcourse. But my question is why did not Maple give both (non-singular) solutions? and it only gave one?

Maple 2016.2

 

 

 

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