fsolve returns unevaluated ...

i have set of equations and variable that i want to solve them using fsolve, but after about 20mintues of computations, fsolve retrun these set unevaluated, could anyone help?

 > restart:with(linalg):with(LinearAlgebra):with(orthopoly):Digits:=40: M:=3: N:=2: l:=2: for m from 0 to M-1 do L[m]:=unapply(P(m,t),t); end do: for n from 1 to N do; for m from 0 to M-1 do; BB[n,m]:=unapply(piecewise((n-1)/N<=t and t
 > ############################################# k:=Matrix(2,2,[[t*s^2,t*s^2],[s*t^2,s*t^2]]):
 >
 >
 >
 >
 >
 >
 >
 >
 >
 > ######################################
 > for i from 1 to 2 do; for j from 1 to 2 do; T[i,j]:=Matrix(N*M,N*M): for n from 1 to M*N do; for m from 1 to M*N do; T[i,j](n,m):=evalf(int(int(B[n]*k(i,j)*BS[m],t=0..1),s=0..1)): end do: end do: od: od: evalm(T[1,1]): evalm(T[1,2]): evalm(T[2,1]): evalm(T[2,2]):
 >
 >
 > ########################################## X[1]:=Matrix(M*N,1): for n from 1 to M*N do; X[1](n,1):=Y[n,1]: od: evalm(X[1]): #### yadet bashe k dar in mesal majhulat y1,y2 ####ba bordarhaye X1, X2 neshun dadi...darvaghe ####dar mesale avale maghale 2ta y dashti k bayad moadele ash ro hal mikardi...
 >
 > X[2]:=Matrix(M*N,1): for n from 1 to M*N do; X[2](n,1):=yY[n,1]: od: evalm(X[2]):
 > U[1,1]:=Matrix(M*N,1): for n from 1 to M*N do; U[1,1](n,1):=u[n,1]: od: evalm(U[1,1]):
 > U[1,2]:=Matrix(M*N,1): for n from 1 to M*N do; U[1,2](n,1):=uU[n,1]: od:
 > evalm(U[1,2]): Transpose(U[1,2]):
 > U[2,1]:=Matrix(N*M,1): for n from 1 to M*N do; U[2,1](n,1):=w[n,1]: od: evalm(U[2,1]):
 > U[2,2]:=Matrix(M*N,1): for n from 1 to M*N do; U[2,2](n,1):=wW[n,1]: od: evalm(U[2,2]):
 >
 > z[1]:=Matrix(1,M*N): z[2]:=Matrix(1,M*N): for i from 1 to 2 do; Z[i]:=Transpose(A)-add(Transpose(U[i,j]).T[i,j], j=1..2); evalm(Z[i]): z[i]:=Z[i]-convert(p[i],Matrix): od: evalm(z[1]): ############## z[1](1,2):
 > ########################################## for s from 1 to M*N do; t:=((2*s)-1)/(2*M*N); ff[1,1]:=eval(VectorMatrixMultiply(Transpose(X[1]),eval(B,t=((2*s)-1)/(2*M*N)))); F[1,s]:=multiply(ff[1,1],ff[1,1]); expand(%): H[1,s]:=VectorMatrixMultiply(Transpose(U[1,1]),eval(B,t=((2*s)-1)/(2*M*N))); hh[1,s]:=F[1,s]-H[1,s][1]; od:
 >
 > ff[1,1]:
 > F[1,1]:
 > H[1,1]:
 > hh[1,2]:
 >
 > for s from 1 to M*N do; t:=((2*s)-1)/(2*M*N); ff[2,1]:=eval(VectorMatrixMultiply(Transpose(X[1]),eval(B,t=((2*s)-1)/(2*M*N)))); G[1,s]:=multiply(ff[2,1],ff[2,1]); expand(%): J[1,s]:=VectorMatrixMultiply(Transpose(U[2,1]),eval(B,t=((2*s)-1)/(2*M*N))); JJ[1,s]:=G[1,s]-J[1,s][1]; od: JJ[1,1]: JJ[1,2]:
 > for s from 1 to M*N do; t:=((2*s)-1)/(2*M*N); ff[1,2]:=eval(VectorMatrixMultiply(Transpose(X[2]),eval(B,t=((2*s)-1)/(2*M*N)))); GG[1,s]:=multiply(ff[1,2],ff[1,2]); expand(%): g[1,s]:=VectorMatrixMultiply(Transpose(U[1,2]),eval(B,t=((2*s)-1)/(2*M*N))); gg[1,s]:=GG[1,s]-g[1,s][1]; od: gg[1,1]: gg[1,2]:
 > for s from 1 to M*N do; t:=((2*s)-1)/(2*M*N); ff[2,2]:=eval(VectorMatrixMultiply(Transpose(X[2]),eval(B,t=((2*s)-1)/(2*M*N)))); DD[1,s]:=multiply(ff[2,2],ff[2,2]); expand(%): d[1,s]:=VectorMatrixMultiply(Transpose(U[2,2]),eval(B,t=((2*s)-1)/(2*M*N))); dd[1,s]:=DD[1,s]-d[1,s][1]; od: dd[1,1]: dd[1,2]:
 > eqq[1]:=seq(hh[1,s],s=1..M*N):
 > eqq[2]:=seq(gg[1,s],s=1..M*N):
 >
 > eqq[3]:=seq(JJ[1,s],s=1..M*N):
 > eqq[4]:=seq(dd[1,s],s=1..M*N): eqq[5]:=seq(z[1](1,s),s=1..M*N): eqq[6]:=seq(z[2](1,s),s=1..M*N):
 > eq:=seq(eqq[s],s=1..M*N):
 > var[1]:=seq(X[1](s,1),s=1..M*N): var[2]:=seq(X[2](s,1),s=1..M*N): var[3]:=seq(U[1,1](s,1),s=1..M*N): var[4]:=seq(U[1,2](s,1),s=1..M*N): var[5]:=seq(U[2,1](s,1),s=1..M*N): var[6]:=seq(U[2,2](s,1),s=1..M*N):
 > EQ:=Matrix(36,1):
 > for i to 6 do EQ(6*i-5,1):=hh[1,i]; EQ(6*i-4,1):=gg[1,i]; EQ(6*i-3,1):=JJ[1,i]; EQ(6*i-2,1):=dd[1,i]; EQ(6*i-1,1):=z[1](1,i); EQ(6*i,1):=z[2](1,i); od:
 > indets(EQ);
 (1)
 >
 >
 > Var:=[seq](var[s],s=1..M*N);
 (2)
 >
 >
 >
 >
 > for i to 36 do EQQ[i]:=simplify(expand(subs([seq](indets(EQ)[i]=AA[i],i=1..36),EQ[i][1])=0)); od;
 (3)
 > fsolve({seq}(EQQ[i],i=1..36),{seq}(AA[i],i=1..36));
 (4)
 >

How do I solve a system of complex equations...

Hello everyone, why is maple not able to solve this easy system of equations?

eq1 := 1 = abs(1/(I*Pi*z*(1+I*Pi*a)));
eq2 := -(5/9)*Pi = argument(1/(I*Pi*z*(1+I*Pi*a)));

`assuming`([fsolve({eq1, eq2}, {a, z})], [a::real, z::real]);

Thanks for helping me! Fabian

How do I solve non linear optimization problem and...

I want to maximize a total profit (TP) function which is dependent on five independent variables (E,W,T, theta, tp). All these five variables can have non negative values. The TP function is given below- ( first TP is directly copied from maple worksheet and than copied again as a picture for clear viewing).

TP = (p1*(Q-q)+p1*(1-theta)*(q-E)+s*E-c*Q-o-h*((1/6)*alpha*W^beta*a*p1^(-b)*tp^3/m-(1/2)*alpha*W^beta*a*p1^(-b)*tp^2+Q*tp)-(t1-tp)*h*((1/2*(-(2/3)*t1+m-(1/3)*tp))*W^beta*a*alpha*(t1-tp)*(-p1*(-1+theta))^(-b)+W*m)/m-(1/2)*h*(W+E)*(T-t1))/T-u*W

I am trying the maximize TP with respect to above five independent variables. I tried to solve  five equations ( representing first order partial derivative of TP with respect to each of the independent variables equated to zero) simultaneously by "solve" and "fsolve" command but both these commands fail to give any output. I have also tried three other commands in optimization package ( QPSolve, NLPSolve, Maximize) but all these three commands also doesn't give any output. I want to prove the concavity of TP function with respect to five independent variables, please guide how it can be done. ( I have computed the Hessian matrix but since five first order equations doesn't give output ( through fsolve command) so I am unable to compute Hessian at these first order optimiality condition solution.). The values of the paramters in the TP equation are -

[alpha = 50, beta = .7, c = 20, h = 4, m = .4, o = 10, p1 = 40, s = 10, u = 5, a = 15000, b = 2]

fsolve in a range gives error...

I am trying to do fsolve in a range (-7..14), however, it gives no solution.

But when I solve the same equations with solve (after removing all the Imaginary solutions), I get two results, one of them is in the range (-7..14).

I even expanded the range of fsolve, say (-10..20), but still got no solution...

This is just getting weirder and weirder. Attached kindly find the Maple file, note that the first solve takes about 1 minute (on my laptop: CPU i7 + MEM 8G + SSD).

fsolve_In_Range.mw

I'd like to have some advice to solve a non linear...

Hi everybody,

I have to solve a system  of 3 equations in 3 unknowns.
One equation is linear while the others are not because of some  sinh(cste*unknown) term.
More of this the unknowns must verify some constraints of inequality type (but always very simple ; for instance “unknown <= value”).

solve fails because of the sinh terms
fsolve fails due to the inequalities

What Maple procedure do you advise me to use to solve this system ?
(at this stage I think advices could be sufficient ; if I keep coming up against the problem I will submit you a more detailed question)

How to find equation of the intersection between ...

With the following command I can plot two spheres and plot them.

f1 := x^2+y^2+z^2 = 1

f2 := x+y+z = 1

with(plottools);

with(plots);

S1 := implicitplot3d(f1, x = -1 .. 1, y = -1 .. 1, z = -1 .. 1, style = patchnogrid, color = blue, scaling = constrained, axes = boxed)

S2 := implicitplot3d(f2, x = -1 .. 1, y = -1 .. 1, z = -1 .. 1, style = patchnogrid, color = gold, scaling = constrained, axes = boxed)

dispaly(S1,S2)

My questions are:

1- How can I display (highlight) the circle which is the intersection between these two sphere on the same figure?

2- How can I find the equation of this circle?

Thank you.

plot of system of equations...

Hi

I have a system of equations (4) which I would like to plot in regards to a fifth variable. Is there a good way to do this. Some of the solutions would end up as negative values, which is not an option I am interested in having.

C__A is my variable, and the other variables I would like to solve are tau,C__B,C__C,C__D. Im specifically interested in tau with regards to C__A. I hope this makes sense :)

regards

C__A := .75;
0.75

a := tau = (C__A0-C__A)/(-r__A);
0.75
tau = - ------------------------------------------------
2
-0.00900 C__B + 0.03500000000 C__C  - 0.075 C__C
b := tau = (C__B0-C__B)/(-r__B);
2 - C__B
tau = - -----------------------------------
2
-0.00900 C__B + 0.03500000000 C__C
c := tau = (C__C0-C__C)/(-r__C);
C__C
tau = ---------------------------------------
2
0.01800 C__B - 0.070 C__C  - 0.075 C__C
d := tau = (C__D0-C__D)/(-r__D);
13.33333333 C__D
tau = ----------------
C__C
sol := fsolve([a, b, c, d], {C__B = 1, C__C = .2, C__D = .2, tau = 50});

{C__B = 1.673672109, C__C = 0.2289836744, C__D = 0.4236721086,

tau = 24.66971264}

solve with a variable or fsolve without variable...

I've encountered a very strange issue with Maple.

The result returns differently with solve and fsolve after/before a variable is given a certain value. See attachment.

The result comes from solve (with variable epsilon) returns value of the same variable with imaginary part while the fsolve returns the correct answer.

Now how can I achieve the same result as fsolve via solve?

Thanks!

Maple_Question_Solve_Fsolve.mw

Maple_Question_Solve_Fsolve.pdf  (exported PDF from Maple)

trouble using fsolve. Different solver needed?...

I have trouble solving this equation

fsolve(5000 = int(1/(0.1060444429e-1-0.2120888857e-1*X+0.1033933318e-1*X^2), X = 0 .. x), x)

It has a few points where the solution will go towards infinite, but that is not something that is an issue normally. I have no problems what so ever to solve this using my trusty TI-89, so Im wondering what needs to be done to actually solve this. I have tried giving an initial guess, and I have tried using solve, but it doesnt seem to do the trick.

Regards

fsolve range problem...

Hello everyone,

I have 5 equations (fa,fb,fc,fk,fv) and 5 variables (V0,A0,A1,A2,k1) and I want to solve them numerically. Problem is my inability to set properly intervals and starting values.

Here is my command: fsolve({fa,fb,fc,fk,fv},{V0,A0,A1,A2,k1});

If I run it just like this, I get some values, lets say V0=0.00045 etc.But when I set range for V0 like this:

fsolve({fa,fb,fc,fk,fv},{V0=0.0004..0.0005,A0,A1,A2,k1});

I get this:

Error, (in fsolve) fsolve cannot solve on V0 = 0.4e-3 .. 0.5e-3

I used interval 0.0004..0.0005 only to prove that there must be the wrong syntax, because obviously 0.0004<0.00045<0.0005. In reality i need interval 0.0001..0.0002 and it is also necessary.to set some initial values (A0=0.0023) but first I need to solve my problem with syntax.

How can I solve a set of equations that one of the...

I solve a set of equations in this way and I have three set of answers ,but I don`t know wich one is true.

and I have another question ,how can I assume v[0] like a constant?

alpha[2]:= 2.727272728*10^5: alpha[4]:= 3738.685337: alpha[6]:= -30.18675539: alpha[7] := -4.116375735*10^6: alpha[8] := 1.859504132*10^10: alpha[9]:= 2.489142857*10^(-12):

l10:=(alpha[7]*v[0]^2+1)*gamma[i*n]^4+(-alpha[4]*beta[n]^2+alpha[8]*v[0]^2-alpha[9])*gamma[i*n]^2+(2*I)*gamma[i*n]*alpha[2]*beta[n]*v[0]+(2*I)*gamma[i*n]^3*alpha[6]*beta[n]*v[0]-beta[n]^2 = 0:

l11 := subs(i = 1, l10);

l12 := subs(i = 2, l10);

l13 := subs(i = 3, l10);

l14 := subs(i = 4, l10);

l15 := (exp(I*(gamma[n]+gamma[2*n]))+exp(I*(gamma[3*n]+gamma[4*n])))*(gamma[3*n]^2-gamma[4*n]^2)*(gamma[n]^2-gamma[2*n]^2)+(exp(I*(gamma[n]+gamma[4*n]))+exp(I*(gamma[2*n]+gamma[3*n])))*(gamma[2*n]^2-gamma[3*n]^2)*(gamma[n]^2-gamma[4*n]^2)+(exp(I*(gamma[2*n]+gamma[4*n]))+exp(I*(gamma[n]+gamma[3*n])))*(gamma[2*n]^2-gamma[4*n]^2)*(-gamma[n]^2+gamma[3*n]^2) = 0;

l1 := combine(expand(evalc(l15)), trig):

l2 := combine(expand(evalc(Re(l15))), trig):

l3 := combine(expand(evalc(Im(l15))), trig): v[0] := 1; 1

fsolve({l1, l11, l12, l13, l14}, {beta[n], gamma[n], gamma[2*n], gamma[3*n], gamma[4*n]}):

fsolve({l11, l12, l13, l14, l2}):

solve({l11, l12, l13, l14, l3}):

thanks

Reyhaneh

Solve... well it depends...

Here is one that the students generated which caused confusion.

a := 0.76;
eq1 := 2*cot(a*sqrt(2*E)) = (2*E-5.4)/(sqrt(E*(5.4-E));
solve(eq1, E)

And the results are: 0., 4.411954070, 2.423743792

The problem is with the second answer because it does not exist. If we plot the LHS and the RHS of eq1 vs E where E=0..5.4

And it gets more interesting, if we calculate:

solve(evalf(eq1), E)

The answers are: 0., 2.423743793, 14.33807304+27.39159712*I

where the 3rd answer is again incorrect.

Finally, if a = 0.8 or larger, the incorrect answers disappear.

Note - fsolve does handle this problem correctly. And despite my attempts to remind them to use fsolve, they see the solve command as the universal truth. Apparently this will be another teaching moment for next year.

So any thoughts about why this happens and why there is a difference in the outcomes between 0.76 and 0.8 for the value of a?

how i can fsolve 8 equations.......

hi .how i can fsolve 8 equations, in which obtained from

for k from 2 to m do eq1[k_] end do

AND

for k from 2 to m do eq2[k_] end do  and so on........

And gain unknown functions as f3[2], f4[4],....

thanks?

############################Define some parameters

############################Define some equation

######################################  APPLY BOUNDARY CONDITIONS

 (1)

 (2)

 (3)

 (4)

 (5)

how i can solve or fsolve this equations?...

hi.how i can solve or fsolve this equations?

i can not with fsolve?

thanks alot

SOLVE.mw

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/SOLVE.mw .