Maple Questions and Posts Maple Questions and Posts Feed

These are Posts and Questions associated with the product, Maple

Hello everybody,

 

I have to solve a non linear equation using a numerical method. I use a loop after each iteration, Maple keep the results in memory instead of release their in variable. So calculation time is very long and the memory goes up.

Could you help me to improve the calculation time ? In fact, I would like to store results in a list and maple erases each intermediate results.

 

Thank a lot

 

 

[carré]NewmarkAlgo2FCzAlp.mw

I am wanting to write a procedure to take a square matrix and have it output a spiral matrix.

for example; M:=Matrix(3,[[1,1,1],[2,2,2],[3,3,3]]);

would turn into

S:=Matrix(3,[[1,1,1],[3,3,2],[3,2,2]]);

Starting in the top left corner and each row follows around clockwise until you reach the middle.

My first thought was I need to be able to call each element (m_i,j) from a matrix and tell it where to go. I could write a different procedure for each square matrix assigning where the elements in the matrix each should move to. Since I could not get it to work for n.

Here is what i have for a 3x3 matrix


Spiral := proc(a1,a2,a3,b1,b2,b3,c1,c2,c3)
local M,S;
M:=Matrix(3,[[a1,a2,a3],[b1,b2,b3],[c1,c2,c3]]);
S:=Matrix(3,[[a1,a2,a3],[c2,c3,b1],[c1,b3,b2]]);
print(M);
print(S);
end:
Spiral(1,2,3,4,5,6,7,8,9);

It is very difficult for me to find information about Matrices in Maple. Any hint on using Maple would be appreciated. Thank you.

Dear all

is it possible to solve bilevel optimization problems in maple?

            min F(x,y)

     s.t.    min G(x,y)

        s.t.   k(x,y)<=0

Hi,

I have a code which stores large amount of intermediate data.

Ones the data has been used i unassign the variables storing the data and perform garbage collection. But memory is not returned to the operating system for reallocation.

can somebody please tell me how to release memory back to os so that task manager shows memory release (without doing the maple server reset).

And i dont understand the purpose of stupid gc if it is not returning memory back to the windows?

I'm trying to plot the graph of a recursive function in Maple 17 but I keep getting the error Error, (in f) too many levels of recursion.

I need to plot a logarithmic graph in the range of x=1,...40. Here is the code:

with(plots); 
f:=x->(2.25*f(x-1)-0.5*f(x-2));
f(1):=1/3;
f(2):=1/12;
logplot(f(x),1..40);

How can I fix this problem? Maybe I need to write it in an iterative form, but I don't know how. Thank you very much for any help!

backtransform in 3D...

Yesterday at 10:14 AM das_goon 10

Hello everyone,

 

how exactly do i 3-d plot some data that i have to back-transform first. in 2-d it is so easy. why isnt it in 3d? all i end up with is an all black diagram

transformIT.mw

please see the file attached

Grateful for some hints

Goon

 

Hello every one,

I had a 3 equations with 3 unknown (X,Y,Z, conjugate(Y),conjugate(Z))

this is the code:

solve( {ao*x + a1*y + conjugate(a1)*conjugate(y)+a2*z+conjugate(a2)*conjugate(z) = 0.5, conjugate(a1)*x + bo*y + conjugate(a2)*conjugate(y)+a1*z = 0, 10*x + 10*y/4 + 10*z = 10}, {x, y, z});

where the coefficients are complex numbers

Is thee any simple way to solve it

thanks

As I am trying to solve this integration:

restart; with(linalg); with(stats); with(plots); with(Statistics); with(LinearAlgebra); with(Optimization);
lambda0 := proc (t) options operator, arrow; gamma0+gamma1*t+gamma2*t^2 end proc;
lambda := lambda0(t)*exp(beta*s);
t1 := 145; t3 := 250; t2 := (t1+t3)*(1/2);
s := 1/(273.16+50); s1 := 1/(273.16+t1); s3 := 1/(273.16+t3); s2 := 1/(273.16+t2); gamma0 := 0.1e-3; gamma1 := .5; gamma2 := 0; beta := -3800;
c := 300; n := 200;
Theta := solve(1-exp(-(gamma0*tau1+(1/2)*gamma1*tau1^2+(1/3)*gamma2*tau1^3)*exp(beta*s1)) = 1-exp(-(gamma0*a+(1/2)*gamma1*a^2+(1/3)*gamma2*a^3)*exp(beta*s2)), a);

a := Theta[1];

Delta := solve(1-exp(-(gamma0*(a+tau2-tau1)+(1/2)*gamma1*(a+tau2-tau1)^2+(1/3)*gamma2*(a+tau2-tau1)^3)*exp(beta*s2)) = 1-exp(-(gamma0*b+(1/2)*gamma1*b^2+(1/3)*gamma2*b^3)*exp(beta*s3)), b);

b := Delta[1];

A1 := `assuming`([unapply(int(exp(beta*s1)*exp(-(gamma0*t+(1/2)*gamma1*t^2+(1/3)*gamma2*t^3)*exp(beta*s1))/(gamma0+gamma1*t+gamma2*t^`2`), t = N .. M), N, M)], [N > 0, M > 0]);
A2 := unapply(int(exp(beta*s2)*exp(-(gamma0*(a+t-tau1)+(1/2)*gamma1*(a+t-tau1)^2+(1/3)*gamma2*(a+t-tau1)^3)*exp(beta*s2))/(gamma0+gamma1*(a+t-tau1)+gamma2*(a+t-tau1)^2), t = N .. M), N, M);
A3 := unapply(int(exp(beta*s3)*exp(-(gamma0*(b+t-tau2)+(1/2)*gamma1*(b+t-tau2)^2+(1/3)*gamma2*(b+t-tau2)^3)*exp(beta*s3))/(gamma0+gamma1*(b+t-tau2)+gamma2*(b+t-tau2)^2), t = N .. M), N, M);
B1 := `assuming`([unapply(int(t^2*exp(beta*s1)*exp(-(gamma0*t+(1/2)*gamma1*t^2+(1/3)*gamma2*t^3)*exp(beta*s1))/(gamma2*t^2+gamma1*t+gamma0), t = N .. M), N, M)], [N > 0, M > 0]);
B2 := unapply(int((a+t-tau1)^2*exp(beta*s2)*exp(-(gamma0*(a+t-tau1)+(1/2)*gamma1*(a+t-tau1)^2+(1/3)*gamma2*(a+t-tau1)^3)*exp(beta*s2))/(gamma0+gamma1*(a+t-tau1)+gamma2*(a+t-tau1)^2), t = N .. M), N, M);
B3 := unapply(int((b+t-tau2)^2*exp(beta*s3)*exp(-(gamma0*(b+t-tau2)+(1/2)*gamma1*(b+t-tau2)^2+(1/3)*gamma2*(b+t-tau2)^3)*exp(beta*s3))/(gamma0+gamma1*(b+t-tau2)+gamma2*(b+t-tau2)^2), t = N .. M), N, M);

F0 := A1(0, tau1)+A2(tau1, tau2)+A3(tau2, c);
F1 := B1(0, tau1)+B2(tau1, tau2)+B3(tau2, c);

NLPSolve(1/(n^3*(F0*F1-F1)), tau1 = 115 .. 201, tau2 = 237 .. 273);

I need to have tau1 tau2 as varibles to get there optimal values ..

But this error keeps coming :


Error, (in Optimization:-NLPSolve) integration range or variable must be specified in the second argument, got HFloat(1.0) = HFloat(158.0) .. HFloat(255.0)

Please Help ..

nonlinear equation ...

July 22 2014 louiz_d 5

Please help me to solve two equations in uploaded find and find two expressions for ‘T’ and ‘n’ as a function of other parameters.

maple.mw

I am a problem with solve differential equation, please help me: THANKS 

g := (y^2-1)^2; I4 := int(g^4, y = -1 .. 1); I5 := 2*(int(g^3*(diff(g, y, y)), y = -1 .. 1)); I6 := int(g^3*(diff(g, y, y, y, y)), y = -1 .. 1); with(Student[Calculus1]); I10 := ApproximateInt(6/(1-f(x)*g)^2, y = -1 .. 1, method = simpson);

dsys3 := {I4*f(x)^2*(diff(f(x), x, x, x, x))+I5*f(x)^2*(diff(f(x), x, x))+I6*f(x)^3 = I10, f(-1) = 0, f(1) = 0, ((D@@1)(f))(-1) = 0, ((D@@1)(f))(1) = 0};

dsol5 := dsolve(dsys3, numeric, output = array([0.]));

              Error, (in dsolve/numeric/bvp) system is singular at left endpoint, use midpoint method instead

****************FORMAT TWO ********************************************************

g := (y^2-1)^2; I4 := int(g^4, y = -1 .. 1); I5 := 2*(int(g^3*(diff(g, y, y)), y = -1 .. 1)); I6 := int(g^3*(diff(g, y, y, y, y)), y = -1 .. 1); with(Student[Calculus1]); I10 := ApproximateInt(6/(1-f(x)*g)^2, y = -1 .. 1, method = simpson);
dsys3 := {I4*f(x)^2*(diff(f(x), x, x, x, x))+I5*f(x)^2*(diff(f(x), x, x))+I6*f(x)^3 = I10, f(-1) = 0, f(1) = 0, ((D@@1)(f))(-1) = 0, ((D@@1)(f))(1) = 0};

dsol5 := dsolve(dsys3, method = bvp[midrich], output = array([0.]));
%;
                                   Error, (in dsolve) too many levels of recursion

I DONT KNOW ABOUT THIS ERROR

PLEASE HELP ME

THANKS A LOT

 

what conditions are necessary that a group G has stabilisers?

Good morning.

 

I request your kind suggestion to my query posted.

 

 

With thanks & Regards

 

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

Hyderabad, Andhra Pradesh, INDIA.

Hi all.

I'm a student learning Algebra.

I've been searching everywhere and cannot work out how to plot and analyze a function graphically in Maple.

 

For example, you can see in this video, There is a point for the Vertex of a parabola on the example

http://www.maplesoft.com/TeacherResource/topic.aspx?m=1&c=1&cha=3&sec=9&top=31

 

I would like to put things like this on my graph (Vertex, or X-Intercepts, or the intersection of 2 lines)

I can certainly find this information by using Algebra (vertex form, etc) but it would help my understanding to also visualize the functions graphically.

Hi,

I wonder if there is a way to achieve this, say I have 4 Maple worksheets,

sheet1.mw

sheet2.mw

sheet3.mw

sheet4.mw

all of them can run seperately. Each of them runs on lots of data, and takes a big chuck of time. I hope to run them one by one. After each file is completed, save (Export) as PDF file, and move on to the next one.

On my own PC, I use Maple X64 windows version. I have never used the command line, but I suppose that will be done in this version, instead of the GUI version?

On the school server, it's Maple X64 linux version. So it's also has the maple command line version as well as the xmaple version.

 

Thanks,

casper

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