MaplePrimes Questions

I have computed the eigenfunction expansion for f(x)=x on 0<x<1 in terms of the eigenfunctions exp(-x/2)*sin(n*Pi*x).

I wish to calculate the weighted L2 error in this expansion (the weight function is w(x)=exp(x)).

Specifically, I want to determine how many terms in the eigenfunction expansion are necessary for the error to be less than say 0.3.

Here is the code:

f := x -> x
w := x -> exp(x)
assume('n', integer);
y :=  (n, x) -> exp(-x/2) sin(n Pi x)       
c := n-> (int(f(x)*y(n, x)*w(x), x = 0 .. 1))/(int(y(n, x)^2*w(x), x = 0 .. 1))
Fourierf := (n, x) -> sum(c(j)*y(j, x), j = 1 .. n)

fsolve(Lerror(n) = 0.3, n);

This seems to run forever without giving a value of n.  I know this is a large computation, but it seems that Maple should be able to handle it.  Does anyone have any suggestions?




Hello everybody,


I want to solve this pde.the desire solution is V(r,z). three boundar conditions are written that two of them are related to rhe radial and one is related to the longitudinal coordinate.

I attached the solution for you. but this solution is derived by Matlab. Now, I just want to resolve it by Maple, but I couldn't reach it. Please let me know the correct way asap.


Thanks a




Q := diff(V(r, z), r, r)+(diff(V(r, z), r))/r-V(r, z)/r^2+diff(V(r, z), z, z)+C/r = 0

diff(diff(V(r, z), r), r)+(diff(V(r, z), r))/r-V(r, z)/r^2+diff(diff(V(r, z), z), z)+C/r = 0





PDESolStruc(V(r, z) = _F1(r)*_F2(z)-(1/2)*(_C1/r+_C2*r+_C3*r*ln(r))*C/_C3, [{diff(diff(_F1(r), r), r) = _F1(r)*_c[1]+(-(diff(_F1(r), r))*r+_F1(r))/r^2, diff(diff(_F2(z), z), z) = -_F2(z)*_c[1]}])












For remainder of division of a (multivariable) polynomial to several polynomials at a same time one can use NormalForm in Maple. It is easy to write a procedure to also show the division but I wonder if there is any determined command such as NormalForm for this aim?


do anybody know, how I can see how a function is programmed? I want to know more about dsolve function and what is hidden behind.

Thank you all

Hej all,

I have a problem. When i have a 9-1 vector "DD" how can i get maple to solve DD^2 my equation is A=(pi/4)*DD^2 should be simple.


Also when i have two vectors one is 9-1 and the other is 5-1 i want to divide the 5-1 / 9-1 but i want all possible soluitons? not just 5 results but 45 results.(the zip fuction only gives me 5 results)


Pls help 


Kind regards


Just thought I'd put a quick one in. I'm trying to solve the Schrodinger equation given as:

schro := {diff(psi(x), x, x)-((b^2-a*(2*p+3))*x^2+2*ab*x^4+a^2*x^6-energy)*psi(x) = 0};

under the constraint energy=(2p+1)b

I'm trying to plot this for a range of values of the parameters a,b and fixed p=0,1.

I'm aiming to get a solution of the form

psi(x)=(x^p) exp((-a(x^4))/4)-(b(x^2)/2)

and plotting it.

Thanks in advance

I wish to compare five letter words in a list of 5 letter words with a string like "*e*d*".  The asterisks represent unknown letters; the e and d, known letters.  I wish to compare this string with each word in the list and discard any words which do not match.  I would end up with a list of matching words eg ["fends", "sends", . . .]   Is there a string function to compare partial matches?  I've looked at the compare and match commands,  but they don't seem applicable.

   Any suggestions would be most appreciated.

Regards, David 

I copy a program from a book and try to run it, but when i try to run it return:

too many levels of recursion

Here is my program:

Hope every one can help me solve this problem. Thank!

I am trying to solve in Maple the system 
d{x}/dt =(1  1 \\1  -1).{x}
with initial conditions {x(0)} =(1 \\ -1),
where {x} is a vector.

This is what I did up to now


but I am not sure how to correctly input the initial conditions to find a solution to the problem. I would appreciate any help provided.

In a trajectory. How can i return the range if i know the position-function. ... return x when y=0?

Recently I have used a FilterForge filter to generate hyperbolic tiles from images (Lua code with Möbius transform etc. available). If an input image (1 see below) is selected a tile (2) is generated if the hyperbolic parameters (5,3,2) were chosen.  How could this be made with Maple?


The origin of this problem is that I want to bound a norm below. After som assigning of variables etc it boils down to minimizing;


I first treat the x,y,z,w as coefficents and optimize over them( these are real and imaginary parts of complex parameters of my norm which on paper is a sum).
I use standard way to get the minia w.r.t these 4 variables via "solve". Then I put the solution into the a new function N(A,B,E,F,G,H) and try to optimize that with NLP and get one solution, but this is only local and it has the following message attached to it;

"Warning, no iterations performed as initial point satisfies first-order conditions"

I want a global minima for my polynomial N in 6 variables and I have some constarints on them aswell. Furthermore I put all variables to be real.

What command or package can I use to get this?

How to put programmatically 2 dots above the first and the last digit  as in the example?


Since the new editor for some reason I cannot upload any pictures or files from my computer.


Previous year I was using Maple 2015 and I had a procedure in which I had used

A := Array((1 .. 3)$3);

And similar use of $. This year I'm using Maple 2016. Now I came back to my old procedure but Maple doesn't compile the procedure anymore and instead shows

Error, `$` unexpected
What is the problem? Is something changed in new version of Maple?

Why I use Array and $ is my old question here which was fine before.

Hi all, I need a heep to solve 6 PDEs from the first order with initial and boundry conditions.

Here is the file

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