Items tagged with solve solve Tagged Items Feed

Hi dear friends 

Is there an interactive package management utility or a way for solving following problem?

for m>=4 It dosent work!

Digits :=30: m := 3: g :=0.3: nu := 0.2: a := 1:
w := sum(b[n]*cos(n*r), n = 1 .. m):
W := simplify( subs( solve( { subs(r = 1, diff(w, r$2)+nu*diff(w,r))},{ b[1] }),w)):
F:= int( ((d2+d1/r)^2-(2*(1-nu))*d2*d1/r)*r*(1+g*r/a)^3,r = 0 .. a) /int( d1^2*r,r = 0 .. a):
FW := simplify( subs(solve( {seq(subs(r=n/m,diff(F,b[n])),n=2..m)},{ seq(b[j], j = 2 .. m) }),F));

Hi, I'm trying to solve without success numerically the following system of 15 nonlinear equations. Could anyone help, please? Thanks


n := 0.27231149e-1:

x := 0.5116034663e-1:

F := .1561816797:

eq1 := sigma*C0 = pgamma*W*H1*(1-E0-L0)/(1+n):

eq2 := sigma*C1 = W*H1*(1-L1):

eq3 := (1+R)*C0 = (1+rho)*exp(x)*C1:

eq4 := (1+R)*C1 = (1+rho)*exp(x)*C2:

eq5 := C1 = (1+phi)*C0:

eq6 := pgamma*L0+pgamma*(1+(1+n)*F/(pgamma*W*H1))*E0+L1 = (1+R)*(1+(1+n)*F/(pgamma*W*H1))/(ppsi*exp(x))-pgamma*(1+(1+n)*F/(pgamma*W*H1))/ppsi:

eq7 := 1 = pgamma*(1+ppsi*E0)/(1+n):

eq8 := exp(x)*A1 = pgamma*W*L0*H1/(1+n)+Epsilon1-C0-F*E0:

eq9 := exp(x)*A2 = W*L1*H1+(1+R)*A1-C1-(1+n)*Epsilon1:

eq10 := (1+R)*A2 = C2:

eq11 := Y = H^alpha*K^(1-alpha):

eq12 := alpha*Y = W*H:

eq13 := (1-alpha)*Y = (1+R)*K:

eq14 := K = A1/(1+n)+A2/(1+n)^2:

eq15 := H = (pgamma*L0+L1)*H1/(1+n):

eq := {eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11, eq12, eq13, eq14, eq15}:

vars := {A1, A2, C0, C1, C2, E0, H, H1, K, L0, L1, R, W, Y, Epsilon1}:


fsolve(eq, vars); 1; assign(%)

fsolve({1 = .6865382886+.1072247031*E0, C1 = 1.475639047*C0, H = .9734907289*(.7052335150*L0+L1)*H1, K = .9734907289*A1+.9476841993*A2, Y = H^.6874443*K^.3125557, (1+R)*A2 = C2, (1+R)*C0 = 1.121850394*C1, (1+R)*C1 = 1.121850394*C2, 1.052491643*A1 = .6865382886*W*L0*H1+Epsilon1-C0-.1561816797*E0, 1.052491643*A2 = W*L1*H1+(1+R)*A1-C1-1.027231149*Epsilon1, 5.171201776*C0 = .6865382886*W*H1*(1-E0-L0), 5.171201776*C1 = W*H1*(1-L1), .3125557*Y = (1+R)*K, .6874443*Y = W*H, .7052335150*L0+.7052335150*(1+.2274915796/(W*H1))*E0+L1 = 6.083468374*(1+R)*(1+.2274915796/(W*H1))-4.515468884-1.027231149/(W*H1)}, {A1, A2, C0, C1, C2, E0, H, H1, K, L0, L1, R, W, Y, Epsilon1})





hi guys, i have a complicated 4 set equations and i want to solve it,

one way is to find a solution for an equation and check it manually in other equations but i am looking for better method



Hi fellow Maple users,

I'm trying to solve an eigenvalue problem of Ax=wx, where A is a 6 by 6 Hermitian matrix with two parameters x and y. I want to solve it for w and then plot3d it with x and y as unknowns. The way I have been doing is first find the characteristic equation Determinant(A-wI)=0 and then solve it for w, and then plot3d the solutions within a range for x and y. My problem is sometimes solve(Determinant(A-wI)=0,w) would give me the 6 solutions expressed in x and y, but sometimes when the numbers in A are changed it will only give me a Rootof solution with which I cannot plot. I'm wondering if there is a better way to do this. I'm actually not very interested in the symbolic solution of w expressed in x and y, just the plot, so if there is a numerical alternative it's good too.

Thank you in advance!

Is there any simple way to extract the feasible range for the variables from solve result ?

For example, when I do solve({x-y = 10, x+y < 100}) I get {x = y + 10, y < 45}

From here, I need -inf<y<45 and -inf<x<55. Is it possible ? (I tried few methods, but it is not working for all cases.)

Why am I getting different results in these two cases ?


hi.i am a problem with rule solve or fsolve in maple....please see attached file and say your comments


sum(xj*(sum(yi, i = k .. n)), j = k .. n)

How do I solve this? Can anone help?

Here x and y both are variables.

How do I iterate starting from a given value. For example, I want to iterate a function F(x) evalf(solve(F(x)=-38)) so that the next value that F(x) uses is the solution to the previous?

I want to reduce all solution of the equation sin(x)^2=1/4

sol:=solve(sin(x)^2=1/4, x, AllSolutions);


sol:=solve(k=1/4, x, AllSolutions = true, explicit);

How can I reduce solution sol := -1/3*Pi*_B3+1/6*Pi+Pi*_Z3 ?

How can I get x= pi/6+k*pi and x= -pi/6+k*pi?

I want to compute the following solve:

C:=A, B, F, H(It has 4 unknowns):

V:=R,Y,E,I (It has 4 equations):


By hand calculations I just found that the solve result is real ,but in maple there is no solution and no error (the maple ignores to solve this equation !!!) 

can anybody help me to find the solve soltuion ?

Thank you 

H. Kabir

I need to solve a set of equations but changing a constant each time.

For example, x+by=0, bx-y=10 where b=10,20.

I don't want to put it in a loop because, in loop, the equations are solved repeatedly. I want Maple to solve it only once and substitute b values automatically since I want to solve big set of equations faster.

Is there any option in Maple to do so with a single command


I am trying to solve a set of ode which depends on some parameters like A0,0,  A1,0, A1,1, B0,0,  B1,0, B1,1, C0,0 and so on. Here is some part of my code:



sigma := 1; X := proc (m) if m <= 1 then 0 elif 2 <= m then 1 end if end proc;

lambda := proc (m, k) if k <= m and 0 <= k then 1 else 0 end if end proc;

Typesetting:-Settings(functionassign = false);

for m from 0  to 4 do    

for k  from 4 by -1 to 0 do  

A[m,k](r) :=diff(f[m,k](r),r$2)+((k+1)*(k+2))/(r^(2))*(lambda(m,k+2)*f[m,k+2](r)-f[m,k](r)):  

T[m,k]:=(k+1)*(lambda(m,k+1)*A[m,k+1](r) -lambda(m,k-1)*A[m,k-1](r)):      

S[m,k]:=(k+1)*(lambda(m,k+1)*f[m,k+1]( r)-lambda(m,k-1)*f[m,k-1](r)):               # There are also C[m,k], B[m,k] and E[m,k] definitions similar to A[m,k],T[m,k] and S[m,k]

Q[m, k] := r^(4-sigma)*E[m, k]-2*lambda(m, k+2)*(k+1)*(k+2)*(r^2*(diff(f[m, k+2](r), `$`(r, 2)))-2*r*(diff(f[m, k+2](r), r)))-(k+1)*(k+2)*(k+4)*((k+3)*lambda(m, k+4)*f[m, k+4](r)-(2*(k+1))*lambda(m, k+2)*f[m, k+2](r));

ode[m, k] := r^4*(diff(f[m, k](r), `$`(r, 4)))-(k+1)*(k+2)*(2*r^2*(diff(f[m, k](r), `$`(r, 2)))-4*r*(diff(f[m, k](r), r))-(k-1)*(k+4)*f[m, k](r)) = Q[m, k];

soln[m, k] := rhs(dsolve(ode[m, k], f[m, k](r)))


After obtaining the solution, there are some additional parts in my code to find the coefficients of odes. The code is just working fine until m=3. When m=3, I am getting this error:

Error, (in solve) cannot solve expressions with Int(-(1/282240)*r*(3*(h . R)^2*(Int((6720*ln(r)*h*r^6-22176*ln(r)*h*r^5-50400*ln(r)*r^6-2814*h*r^6+33600*r^7+18144*ln(r)*h*r^4+90720*ln(r)*r^5+8238*h*r^5-95520*r^6+2352*h*ln(r)*r^3-7974*h*r^4+57780*r^5-2880*ln(r)*h*r^2-14400*ln(r)*r^3-2443*h*r^3+2100*r^4+6108*h*r^2+5340*r^3-1115*h-3300*r)/r^6, r))-4480*_C1), r) for _C1

I think the problem is due to declaration of f[m,k](r) values for the set of odes. For example, before solving ode[3,3], the code declares a value for f[3,3](r) which includes some integral definition in ode[3,3] although i want to find the solution for f[3,3](r). 

To illustrate,

ode[1,1]=r^4*(diff(f[1, 1](r), r, r, r, r))-12*r^2*(diff(f[1, 1](r), r, r))+24*r*(diff(f[1, 1](r), r)) = -Typesetting[delayDotProduct](r, h . R, true)*((2*(diff(f[0, 0](r), r))-4*f[0, 0](r)/r)*(diff(f[0, 0](r), r, r)-2*f[0, 0](r)/r^2)-(2*(-3/4-1/(4*r^2)+r))*A[0, 0]+(2*(diff(f[0, 0](r), r, r, r)+4*f[0, 0](r)/r^3-2*(diff(f[0, 0](r), r))/r^2))*f[0, 0](r))

soln[m, k] := rhs(dsolve(ode[m, k], f[m, k](r)))


where I already know the definition of f[0,0](r)=-(3/4)*r+1/(4*r)+(1/2)*r^2   and A[0,0]=1/(2*r^3)+1+(2*((3/4)*r-1/(4*r)-(1/2)*r^2))/r^2 

So, ode[1,1] can be solved with respect to f[1,1](r).

I would be glad for any comments. 

Here is my code.

There is million items in list, 

what is the difference between seq and for loop ?

is seq faster than for loop?

it is very slow when running code below, how to speed up this part of code?

HSKeyIn := Table();
for ij from 1 to 1685159 do
s := solve([mm[ij][1,1]=1,mm[ij][1,2]=1,mm[ij][1,3]=1],[a,b,c]):
if nops(s) > 0 then
if (rhs(s[1][1]) = 1 or rhs(s[1][1]) = 0) and (rhs(s[1][2]) = 1 or rhs(s[1][2]) = 0) and (rhs(s[1][3]) = 1 or rhs(s[1][3]) = 0) then
#print(lhs(indices(T3, pairs)[ij])):
h := HilbertSeries([mm[ij][1,1],mm[ij][1,2],mm[ij][1,3]], {a,b,c}, z):
if not assigned(HSkeyIn[h]) then
if mod(ij, 100) = 0 then
end if:
HSkeyIn[h] := [[mm[ij][1,1],mm[ij][1,2],mm[ij][1,3]]]:
if mod(ij, 100) = 0 then
end if:
HSkeyIn[h] := [op(HSkeyIn[h]), [mm[ij][1,1],mm[ij][1,2],mm[ij][1,3]]]:
end if:

end if:
end if:

why the the software can't solve the integral like ∫xdlnx?

Thanks in advance for your help.

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