Items tagged with equation equation Tagged Items Feed

Hai everyone. I used maple 12 and have an equation as follow:

int(int(lambda[v]*lambda[t]*exp(-lambda[v]*v-lambda[t]*t), v = (1/2)*(q[p]+q[p]*t[c]*t+2*S[di]*h*t)/(h*t) .. infinity), t = 0 .. infinity)

 

and try to get an outcome as follow:

However, I cannot get the outcome like I want. The maple just diplay the equation. Any tips or suggestion?

Thanks

Regards,

Dolby87

What is the weak solution integral equation for 

du(x)/dx2 -(1+x2 ) u(x)-1=0

Hello,

Maple needs 827 characters to write a equation of a straight line.
Is that true or what am I doing wrong?   

Can anybody help me or give a direction to handle with such problems?

Putting
  assume(2<alpha , alpha<=4);about (alpha);
before it does not help either.

f:=-(6*(3*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))^4/(alpha-1)^4-12*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))^3/(alpha-1)^3-6*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^4/(alpha-1)^4+16*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2+24*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^3/(alpha-1)^3+3*(alpha-1+sqrt(alpha^2-3*alpha+2))^4/(alpha-1)^4-8*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))/(alpha-1)-24*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2-12*(alpha-1+sqrt(alpha^2-3*alpha+2))^3/(alpha-1)^3+8*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2+8*alpha+(8*(alpha-1+sqrt(alpha^2-3*alpha+2)))/(alpha-1)-7))/(alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2-2*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))/(alpha-1)-(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2+(2*(alpha-1+sqrt(alpha^2-3*alpha+2)))/(alpha-1)-1)^4;

Hi all

In matlab software we have a command namely fmincon which minimizes any linear/nonlinear algebric equations subject to linear/nonlinear constraints.

Now my question is that: what is the same command in maple?or how can we minimize linear/nonlinear function subject to linear/nonlinear constraints in maple?

thanks a lot

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Hi,

What is the reason/Why: 

 

Error, (in dsolve/numeric/bvp) unable to achieve requested accuracy of 0.1e-5 with maximum 128 point mesh (was able to get 0.66e-1), consider increasing `maxmesh` or using larger `abserr`

Thanks for the help :)

The equation

x^7+14*x^4+35*x^3+14*x^2+7*x+88 = 0

has the unique real root

x = (1+sqrt(2))^(1/7)+(1-sqrt(2))^(1/7)-(3+2*sqrt(2))^(1/7)-(3-2*sqrt(2))^(1/7).

Here is its verification:

Is it possible to find that in Maple? I unsuccessfully tried the solve command with the explicit option.

 

 

 

Hi ,

I would like to resolve the Kortweg and de Devries equation :

> KDV2:= diff( u(X,T), T)+ 6*u(X,T)*diff(u(X,T),X)+ diff(u(X,T),X$3);

 

I used pdsolve but I have a problem to enter the IBC :

I want

u(infinity, t) =0
u( -infinity, t )=0

u ( x, 0 ) = 1


So I did :


> SOL:=pdsolve(diff( u(X,T), T)+ 6*u(X,T)*diff(u(X,T),X)+ diff(u(X,T),X$3)=0,{u(-10, T) = 0, u(10, T) = 0, u(X, 0) =1},numeric,time=T,range=-10..10);

 

But it doesn't work.

( I remplace infinity by 10 because then I want the graphic representation of the solution )

Could you help me please ?  

When trying to solve a set of partial differential equations, I always get the following error. I don't know what it means. Can somebody help me?

 

Dear All, I need your help to plot the numerical solution. many thanks.

The variable t in [0,T], x in [0,1], b in [0,2].

Difference finie for waves equation is :

pde:=diff(u(x, y,t), t$2) = c^2*(diff(u(x, y,t),x$2)+diff(u(x,y,t),y$2));

i: according to x, j according to y, and k according to t.

u[i,j,k+1]=2*u[i,j,k]-u[i,j,k-1]+(c*dt/dx)^2*(u[i-1,j,k]-2*u[i,j,k]+u[i+1,j,k])+ (c*dt/dy)^2*(u[i,j-1,k]-2*u[i,j,k]+u[i,j+1,k])

 

Boundary condition: u(t=0)=1, diff(u(x,y,t),t=0)=0, and the normal derivative on the boundary of Omega =0.

How can solve this problem and plot the numerical solution.

 

 

 

Hi MaplePrime-ers!

I've been using the Maple(17) toolbox in Matlab(2012b) to quickly enumerate systems of equations by: (i) solving them symbolically, (ii) using unapply to make them functions, (iii) then supplying the points (driver equations) to get the system solution.  Speed is a must, because there may be 3 million+ systems to solve.  Symbolics is also very important because I am evaluating topology, so the structure of the equations may change, and therefore a functional approach will not work.

I have had success (seen in the first code snippet).  I would like similiar behaviour in the second code snippet, but sometimes I get 'solutions may be lost' as an error message,  or 'Error, (in unapply) variables must be unique and of type name'

The system of equations include:  Linear equations, 5th order polynomials, absolute functions, and pieceiwse functions.

Here is code with a topology that solves:

#Interconnection Equations
eq2[1] := FD_T + EM2_T = 0;
eq2[2] := ICE_T + GEN_T = 0;
eq2[3] := EM2_A + GEN_A + BAT_A = 0;
eq2[4] := -FD_W + EM2_W = 0;
eq2[5] := -ICE_W + GEN_W = 0;
eq2[6] := -EM2_V + GEN_V = 0;
eq2[7] := -EM2_V + BAT_V = 0;

#ICE
eq_c[1] := ICE_mdot_g=((671.5) + (-21.94)*ICE_T + (0.1942)*ICE_W + (0.5113)*ICE_T^2 + (-0.01271)*ICE_T*ICE_W + ( -0.0008761)*ICE_W^2 + (-0.006071)*ICE_T^3 + (9.867e-07)*ICE_T^2*ICE_W + (5.616e-05)*ICE_T*ICE_W^2 + (1.588e-06)*ICE_W^3 + (3.61e-05)*ICE_T^4 + (8.98e-07)*ICE_T^3*ICE_W + (-2.814e-07)*ICE_T^2*ICE_W^2 + (-8.121e-08)*ICE_T*ICE_W^3 + ( -8.494e-08 )*ICE_T^5 + (-2.444e-09)*ICE_T^4*ICE_W + (-9.311e-10)*ICE_T^3*ICE_W^2 + ( 5.835e-10)*ICE_T^2*ICE_W^3 ) *1/3600/1000 * ICE_T * ICE_W;

#BAT
eq_c[2] := BAT = 271;

#EM2
EM2_ReqPow_eq := (-148.3) + (4.267)*abs(EM2_W) + (12.77)*abs(EM2_T) + (-0.0364)*abs(EM2_W)^2 + ( 1.16)*abs(EM2_W)*abs(EM2_T) + (-0.258)*abs(EM2_T)^2 + ( 0.0001181)*abs(EM2_W)^3 + (-0.0005994)*abs(EM2_W)^2*abs(EM2_T) + ( 0.0001171)*abs(EM2_W)*abs(EM2_T)^2 + (0.001739 )*abs(EM2_T)^3 + (-1.245e-07 )*abs(EM2_W)^4 + ( 1.2e-06)*abs(EM2_W)^3*abs(EM2_T) + ( -1.584e-06)*abs(EM2_W)^2*abs(EM2_T)^2 + ( 4.383e-07)*abs(EM2_W)*abs(EM2_T)^3 + (-2.947e-06)*abs(EM2_T)^4;
eq_c[3] := EM2_P = piecewise( EM2_T = 0, 0, EM2_W = 0, 0, EM2_W*EM2_T < 0,-1 * EM2_ReqPow_eq, EM2_ReqPow_eq);
eq_c[4] := EM2_A = EM2_P/EM2_V;

#GEN
GEN_ReqPow_eq:= (-5.28e-12) + ( 3.849e-14)*abs(GEN_W) + (-71.9)*abs(GEN_T) + (-1.168e-16)*abs(GEN_W)^2 +(1.296)*abs(GEN_W)*abs(GEN_T) + (2.489)*abs(GEN_T)^2 + (1.451e-19)*abs(GEN_W)^3 + (0.0001326)*abs(GEN_W)^2*abs(GEN_T) + (-0.008141)*abs(GEN_W)*abs(GEN_T)^2 + (-0.004539)*abs(GEN_T)^3 +(-6.325e-23)*abs(GEN_W)^4 + (-2.091e-07)*abs(GEN_W)^3*abs(GEN_T) + ( 3.455e-06)*abs(GEN_W)^2*abs(GEN_T)^2 + ( 2.499e-05)*abs(GEN_W)*abs(GEN_T)^3 + (-5.321e-05)*abs(GEN_T)^4;
eq_c[5] := GEN_P = piecewise( GEN_T = 0, 0, GEN_W = 0, 0, GEN_W*GEN_T < 0,-1 * GEN_ReqPow_eq, GEN_ReqPow_eq);
eq_c[6] := GEN_A = GEN_P/GEN_V;

#ASSUMPTIONS
assume(BAT_V::nonnegative);
assume(FD_W::nonnegative);

#FINAL EQUATIONS

sys_eqs2 := convert(eq2,set) union {eq_c[1],eq_c[2],eq_c[3],eq_c[4],eq_c[5],eq_c[6]};

#Selecting which variables to solve for:

drivers2:= { ICE_T,ICE_W,FD_T,FD_W};
symvarnames2:=select(type,indets(convert(sys_eqs2,list)),name);
notdrivers2:=symvarnames2 minus drivers2;


#Symbolic solve

sol2:=solve(sys_eqs2,notdrivers2) assuming real:
symb_sol2:=unapply(sol2,convert(drivers2,list)):


#Enumerate (there will generally be about 40, not 6)

count := 0;
for i1 from 1 to 40 do
     for i2 from 1 to 40 do
          for i3 from 1 to 40 do
               for i4 from 1 to 40 do
                    count := count + 1;
                    solsol2(count) := symb_sol2(i1,i2,i3,i4);
               od;
          od;
     od;
od;
count;



This works great!  I would like simliar output in my second code snippet, but this time with more inputs to symb_sol.  However, if I try and change the interconnection equations a little, and add a piecewise function, and another driver... (differences in bold)

#Interconnection Equations
eq1[1] := FD_T+EM2_T = 0;
eq1[2] := ICE_T+GBb_T = 0;
eq1[3] := GEN_T+GBa_T = 0;
eq1[4] := EM2_A+GEN_A+BAT_A = 0;
eq1[5] := -FD_W+EM2_W = 0;
eq1[6] := -GEN_W+GBa_W = 0;
eq1[7] := -ICE_W+GBb_W = 0;
eq1[8] := -EM2_V+GEN_V = 0;
eq1[9] := -EM2_V+BAT_V = 0;

#ICE
eq_c[1] := ICE_mdot_g=((671.5) + (-21.94)*ICE_T + (0.1942)*ICE_W + (0.5113)*ICE_T^2 + (-0.01271)*ICE_T*ICE_W + ( -0.0008761)*ICE_W^2 + (-0.006071)*ICE_T^3 + (9.867e-07)*ICE_T^2*ICE_W + (5.616e-05)*ICE_T*ICE_W^2 + (1.588e-06)*ICE_W^3 + (3.61e-05)*ICE_T^4 + (8.98e-07)*ICE_T^3*ICE_W + (-2.814e-07)*ICE_T^2*ICE_W^2 + (-8.121e-08)*ICE_T*ICE_W^3 + ( -8.494e-08 )*ICE_T^5 + (-2.444e-09)*ICE_T^4*ICE_W + (-9.311e-10)*ICE_T^3*ICE_W^2 + ( 5.835e-10)*ICE_T^2*ICE_W^3 ) *1/3600/1000 * ICE_T * ICE_W;

#BAT
eq_c[2] := BAT = 271;

#EM2
EM2_ReqPow_eq := (-148.3) + (4.267)*abs(EM2_W) + (12.77)*abs(EM2_T) + (-0.0364)*abs(EM2_W)^2 + ( 1.16)*abs(EM2_W)*abs(EM2_T) + (-0.258)*abs(EM2_T)^2 + ( 0.0001181)*abs(EM2_W)^3 + (-0.0005994)*abs(EM2_W)^2*abs(EM2_T) + ( 0.0001171)*abs(EM2_W)*abs(EM2_T)^2 + (0.001739 )*abs(EM2_T)^3 + (-1.245e-07 )*abs(EM2_W)^4 + ( 1.2e-06)*abs(EM2_W)^3*abs(EM2_T) + ( -1.584e-06)*abs(EM2_W)^2*abs(EM2_T)^2 + ( 4.383e-07)*abs(EM2_W)*abs(EM2_T)^3 + (-2.947e-06)*abs(EM2_T)^4;
eq_c[3] := EM2_P = piecewise( EM2_T = 0, 0, EM2_W = 0, 0, EM2_W*EM2_T < 0,-1 * EM2_ReqPow_eq, EM2_ReqPow_eq);
eq_c[4] := EM2_A = EM2_P/EM2_V;

#GEN
GEN_ReqPow_eq:= (-5.28e-12) + ( 3.849e-14)*abs(GEN_W) + (-71.9)*abs(GEN_T) + (-1.168e-16)*abs(GEN_W)^2 +(1.296)*abs(GEN_W)*abs(GEN_T) + (2.489)*abs(GEN_T)^2 + (1.451e-19)*abs(GEN_W)^3 + (0.0001326)*abs(GEN_W)^2*abs(GEN_T) + (-0.008141)*abs(GEN_W)*abs(GEN_T)^2 + (-0.004539)*abs(GEN_T)^3 +(-6.325e-23)*abs(GEN_W)^4 + (-2.091e-07)*abs(GEN_W)^3*abs(GEN_T) + ( 3.455e-06)*abs(GEN_W)^2*abs(GEN_T)^2 + ( 2.499e-05)*abs(GEN_W)*abs(GEN_T)^3 + (-5.321e-05)*abs(GEN_T)^4;
eq_c[5] := GEN_P = piecewise( GEN_T = 0, 0, GEN_W = 0, 0, GEN_W*GEN_T < 0,-1 * GEN_ReqPow_eq, GEN_ReqPow_eq);
eq_c[6] := GEN_A = GEN_P/GEN_V;

#GB
FiveSpeedGearbox_R := proc(ig)
local i ,eq;
i[1]:=3.32;
i[2]:=2;
i[3]:=1.36;
i[4]:=1.01;
i[5]:=0.82;
eq:= piecewise(ig=1,i[1],ig=2, i[2],ig=3,i[3],ig=4,i[4],ig=5,i[5],1);
return eq(ig);
end proc;


eq_c[7] := GBb_T = -1/GB_R * GBa_T;
eq_c[8] := GBb_W = GB_R * GBa_W;
eq_c[9] := GB_R = FiveSpeedGearbox_R(ig);

 

#System Equations
sys_eqs := convert(eq1,set) union convert(eq_c,set);

 

 #Solve for variables
symvarnames:=select(type,indets(convert(sys_eqs,list)),name);
drivers:= {ig, ICE_T,ICE_W,FD_T,FD_W};
not_drivers := symvarnames minus drivers;

#Assumptinons

assume(BAT_V::nonnegative);
assume(FD_W::nonnegative);

sol:=(solve(sys_eqs,not_drivers) assuming real);

symb_sol:=unapply(sol,convert(drivers,list)): ---> Error, (in unapply) variables must be unique and of type name

Subsequent parts don't work...

count := 0;
for i1 from 1 to 40 do
     for i2 from 1 to 40 do
          for i3 from 1 to 40 do
               for i4 from 1 to 40 do
                    for i5 from 1 to 40 do
                         count := count + 1;
                         solsol2(count) := symb_sol2(i1,i2,i3,i4,5);
                    od;
               od; 
          od;
     od;
od;
count;

While running the last line sol:, 1 of 2 things will happen, depending on the solver. Maple17 will take a long time (30+ minutes) to solve, then report nothing, or sol will solve, but will report "some solutions have been lost".

Afterwards, evaluating symb_sol(0,0,0,0,0) will return a viable solution (real values for each of the variables).  Whereas evaluating symb_sol(0,X,0,0,0), where X <> 0, will return and empty list [].

Does anyone know how to (i) speed up the symbolic solve time?  (ii) Return ALL of the solutions?

 

Thanks in advance for reading this.  I've really no idea why this isn't working.  I've also attached two worksheets with the code: noGB.mw   withGB.mw

 Adam

Hi all,

By solving cubic equation in maple (version 17), I got

restart

``

-0.363700352e-2*y^3-.4041941000*y^2+3.397775673*y-2.377540486 = 0

-0.363700352e-2*y^3-.4041941000*y^2+3.397775673*y-2.377540486 = 0

(1)

"(->)"

[[y = .7709248124], [y = 7.123944371], [y = -119.0286907]]

(2)

``

Now I want to find these roots through the formula.

 

I solve it generally in Maple.. 

 

``# Suppose

A*y^3+B*y^2+C*y+E = 0

A*y^3+B*y^2+C*y+E = 0

(3)

NULL

A := -0.363700352e-2:

B := -.4041941000:

C := 3.397775673:

E := -2.377540486:

``

A*y^3+B*y^2+C*y+E = 0

 

A*y^3+B*y^2+C*y+E = 0

(4)

``

y1 := (1/6)*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3)/A-(2/3)*(3*A*C-B^2)/(A*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3))-(1/3)*B/A

-45.82526955*(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3)-36.74197467/(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3)-37.04460717

(5)

"(=)"

-119.0286907-0.1e-8*I

(6)

y2 := y = -(1/12)*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3)/A+(1/3)*(3*A*C-B^2)/(A*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3))-(1/3)*B/A+(1/2*I)*sqrt(3)*((1/6)*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3)/A+(2/3)*(3*A*C-B^2)/(A*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3)))

y = 22.91263477*(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3)+18.37098733/(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3)-37.04460717+((1/2)*I)*3^(1/2)*(-45.82526955*(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3)+36.74197467/(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3))

(7)

"(=)"

y = .770924807+0.1772050808e-7*I

(8)

y3 := y = -(1/12)*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3)/A+(1/3)*(3*A*C-B^2)/(A*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3))-(1/3)*B/A-(1/2*I)*sqrt(3)*((1/6)*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3)/A+(2/3)*(3*A*C-B^2)/(A*(-108*E*A^2+36*A*B*C+12*sqrt(3)*sqrt(27*A^2*E^2-18*A*B*C*E+4*A*C^3+4*B^3*E-B^2*C^2)*A-8*B^3)^(1/3)))

y = 22.91263477*(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3)+18.37098733/(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3)-37.04460717-((1/2)*I)*3^(1/2)*(-45.82526955*(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3)+36.74197467/(.7114884222-(0.5542993294e-1*I)*3^(1/2))^(1/3))

(9)

"(=)"

y = 7.123944373-0.1692050808e-7*I

(10)

``


y1, y2, y3 formulas are computed by Maple by solving it for general formula.
But, now I got answers in real and imaginery parts, i.e

 

y1 = -119.0286907-1.*10^(-9)*I

y2 = .770924807+1.772050808*10^(-8)*I

y3 = 7.123944373-1.692050808*10^(-8)*I

 

Why, is it so?

 

 

I want answers in simple forum directly only by using these formulas. As i have to show the proof!

Thanks in advance

 

Download qstn.mw

 

Dear all,

Thanks for your answer. I have a simple question:

Let A be a Matrix, X[1] and X[2] two vectors.

I have this equation:  X[2]= X[1]+ A*X[1]+A*X[2];  Using Maple how can I  writte X[2] =P*X[1]; where P is a matrix to be founded.

Here, P:=(Id-A)^(-1)*A; But how using maple.

 

 

 

 

 

I'm taking calculus and my professor introduced us to maple software. The professor asked us to plot the families of curves for this orthogonal equation:

dy/dx = (x^2) - (2y^2) - C = 0

This is what I had so far:

 

restart;

with(DEtools):

with(plots):

 

Function:=unapply(simplify(x^2-2y^2-C),(x,y)):

'Function'(x,y) = Function(x,y);

plotFunction:=C->implicitplot(eval(F(x,y),a=C),x=-5..5,y=5..5,scaling=constrained):

plot1:=display(seq(plotFunction(a),a=-5..5)):

display(plot1);

 

This is only display one family. How do I code for it plot the other families?

(The graph should look like curves converging from left, top and right sides toward to the origin of the axes)

Please help.

hi, I am new here I want to solve these toe coupled equations with the following boundary condition numerically:

  1)  diff(f(eta),eta$3)+(1)/(2)*f(eta)*diff(f(eta),eta$2)-xi*(2*f(eta)*(diff(f(eta),eta))*

(diff(f(eta),eta,eta))+f(eta)^2*(diff(f(eta),eta,eta,eta))+eta*(diff(f(eta),eta))^2*(diff(f(eta),eta$2)))-K*

(diff(f(eta),eta)-1)=0

2)   diff(theta(eta),eta,eta)+(1)/(2)*Pr*f(eta)*(diff(theta(eta),eta))=0

boundary conditions: 1)  f(0) = 0   2)  D(f)(0) = 0   3)  D(f)(infinity=10) = 1

                               1) theta(infinity=10) = 1      2) theta(0)=0

xi=0.2 ... 1    K=0.2     pr=0.7

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