Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

When print a formula , if variable has power, the power will print in another row

how can it print like a^2 in one row 

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

plot([2*cot(0.76*sqrt(2*E)), (2*E-5.4)/sqrt(E*(5.4-E))], E=0..5.4, -3..3)

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?

 

hi.

how i can dsolve this differential equations?

thanks

ich.mw
 

restart; Digits := 50; dsol1 := dsolve({diff(F(eta), eta, eta, eta)+.5*H(eta)*((diff(F(eta), eta))^2+F(eta)*(diff(F(eta), eta, eta)))/G(eta)^2+2*(diff(G(eta), eta))*(diff(F(eta), eta, eta))/G(eta)-(diff(H(eta), eta))*(diff(F(eta), eta, eta))/H(eta) = 0, diff(G(eta), eta, eta)+H(eta)*((diff(F(eta), eta))*G(eta)+.5*F(eta)*(diff(eta, eta)))/G(eta)^2+2*(diff(G(eta), eta))^2/G(eta)-((diff(H(eta), eta))*(diff(H(eta), eta)))/H(eta)+(diff(F(eta), eta, eta))^2-(H(eta)/G(eta))^2 = 0, diff(H(eta), eta, eta)+(.5*1.3)*H(eta)*(5*(diff(F(eta), eta))*H(eta)+F(eta)*(diff(H(eta), eta)))/G(eta)^2+2*(diff(G(eta), eta))*(diff(H(eta), eta))/G(eta)-(diff(H(eta), eta))^2/H(eta)+(1.3*1.44)*H(eta)*(diff(F(eta), eta, eta))/G(eta)-(1.3*1.92)*(H(eta)/G(eta))^3 = 0, F(0) = 0, G(0) = 0, H(0) = 0, (D(F))(0) = 1, (D(F))(1) = 0, (D(G))(0) = 0, (D(H))(0) = 0}, 'maxmesh' = 900, numeric, output = listprocedure, method = bvp[middefer], abserr = 0.1e-2); fy := eval(F(eta), dsol1)

Error, invalid input: eval received dsol1, which is not valid for its 2nd argument, eqns

 

 

NULL


 

Download ich.mw

 

HI everyone,

As can be seen from the attached file, the first three equations of Eq. (5) will render some of the other equations (and other terms) redundant. How can I obtain a simplified system automatically?

Thanks.

Pdesample.mw

Dear all:

I have used the "diff" command in Maple to help me derive a huge and very long function, and now I want to convert this huge expression from Maple to Matlab format, for example, into a Matlab .m file. The format of this expression in Maple is very different from Matlab.

So could you help me with this problem?

Thank you all.

Hello,

In my worksheet (dedicated to the calculations of mechanism geometry), i'm trying to have a more "POO" approach (Programming Oriented Object).

In this sense, I begin to get more familiar with module and package. Attached, you can find a worksheet which gives the idea of the structure of my code. With this code, the module is very useful for me to call some results (attributes in terms of POO).

My way of doing is :
1) at the beginning, i use Maple as a calculator that is to say that at each prompt, i calculate expressions.
2) i try to make modules so as to have a easier access to the data that I calculated.

However, as the definition of the expressions that I calculated are outside my module (for example, in the worksheet attached, i calculate the expression of Gamma and psi before in my worksheet and i retrieve these expressions in the module with "global"), i can not use this module independently of this worksheet and namely in a Excel Addin.

In fact, the module works if the worksheet has been launched one time and consequently the expression of psi and Gamma are in the kernel (or in memory i want to say).

Question:

How can I do to transform my module in a independent and thus portable module ?

One idea will be to copy/ paste all the geometric calculations which have been done line by line inside the module.
However, i have many lines in separated prompts and moreover, it is always convenient to keep the line by line approach in the worksheet to make some tests.

I look forward to hearing your tips.

Thanks a lot for your help

MonPackage_ProcModule_variante4.mw

 


 

Hello

Tryed to work this application, but problems encountered.

http://www.maplesoft.com/applications/view.aspx?SID=89020

and

http://www.mapleprimes.com/maplesoftblog/89021-The-Traveling-Salesmans-US-Roadtrip

I installed PostgreSQL, (i believe version 8.4 from 2010) which I found at "oldapps" (the current version is 9.6).

I'm running Win 7, 64 bit. Anyways, I have to change the paths below "Query the database":

driver := LoadDriver(classpath = "C://Program Files (x86)//PostgreSQL//pgJDBC//postgresql-8.4-701.jdbc4.jar");

conn := driver:-OpenConnection("jdbc:postgresql://localhost:5432/zip_codes", "postgres", "password");

I fail to see pgJDBC folder and a search for .jar files in the directory yields only 3 jar files, non resembling the above. tried example.jar

same error. heres a screenshot of my directory

I'm curious to know if anyone has written a procedure to optimize the VRP with time windows / constraints.

How do i implement Runge-Kutta of order 6 for a sytem of boundary value problems on maple

Dear all

I am facing to run the following expression for an arbitrary values of M, k and alpha.

u := simplify(sum(sum(c[p, q]*2^((K-1)*(1/2))*(sum(sum(sum(sum(2^((K-1)*(p-i-j+q-k-l))*GAMMA(p-i-j+1)*x^(p-i-j-alpha)*(1-p)^j*(1-q)^l*g[i]*binomial(p-i, j)*binomial(p, i)*binomial(p-k, l)*binomial(q, k)/GAMMA(p-i-alpha-j+1), l = 0 .. q-k), k = 0 .. q), j = 0 .. p-i-ceil(alpha)), i = ceil(alpha) .. p))/sqrt(2*(-1)^q*factorial(q)^2*g[2*q]/factorial(2*q)), q = 1 .. Delta), p = ceil(alpha) .. Delta));
FD := simplify(convert(%, StandardFunctions)); expand(radnormal(convert(FD, elementary)))

Please correct it and run it for M=10, k=1, alpha=0.5.

Hello,

I have a optimization question in the following picture.

 

Question: find matrix T(t). 

 

I writed a maple code. Could you view it ? You think that it is right?

The code file I writed: maple_code_of_theory.mw

 It is really very important for me. Can you help me?

Thank you. 

 

,Hello everyone 

...I need code for save maple's project like a video

Thankyou

 

Hi all. I need to solve a large number of PDEs (partial differential equations) symbolically and simultaneously, to find the linearly independant answers for all of them, I use

ans := pdsolve({seq(PDE[i]=0,i=1..d)});

The PDEs are all linear first order and it is very easy to solve them one by one by hand, but in some cases I have 100 PDEs or more, so Maple is either very slow or doesn't work. For d=120, it was evaluating for hours without a result.

 

For example I have d=120 PDEs, and 200 variables. It works for d=30 of them (takes 13 minutes on my 16GB RAM  windows 7 computer). So if I do this:

ans1 := pdsolve({seq(PDE[i]=0,i=1..30)});

ans2 := pdsolve({seq(PDE[i]=0,i=31..60)});

ans3 := pdsolve({seq(PDE[i]=0,i=61..90)});

ans4 := pdsolve({seq(PDE[i]=0,i=91..120)});

Then how can I have only one vector of the linearly independent answers of all of them?

 

And in general, is Maple supposed to do this kind of calculations at all?

If yes, do you have any ideas on how to improve this procedure? 

If not, do you know in which software or programming package I can solve a large number of PDEs symbolically?

Your help is much appreciated. 

If you have a list that is too large the list will go off the screen without a way of scrolling.

Is there a way around that?

Here's some test code

with(Maplets):
with(Elements):
maplet := Maplet([["Pick a color:  ", ListBox['LB1'](sort(["blue", "red", "wheat", "yellow", "brown", "gold", "plum", "orange", "pink", "khaki", "magenta", "maroon", "white", "green", "aquamarine", "black", "gray", "navy", "coral", "cyan", "sienna", "tan", "turquoise", "violet", seq(i, i = "a" .. "z")], lexorder))], [Button("OK", Shutdown(['LB1'])), Button("Cancel", Shutdown())]]):
result := Maplets[Display](maplet);

 

The Maplets, Elements, ListBox (ListBox) example given on the help page doesn't work.  I use the button to transfer the page to a worksheet window but then when I execute them I get an error.  Below is the example given on the help page.  And following that is the errors given after execution.

First 127 128 129 130 131 132 133 Last Page 129 of 2097