MaplePrimes Questions

Hey everyone,

f_1 and f_2  are satisfying the set of non-linear integral equations I have attached to this message.
I know that I need to solve them numerically by iterations. Probably, the first guest of the function f_1 and f_2  is the driving term. a is just a parameter which can be fixed (I guess smaller than \pi/4). * is the convolution product and k is the momentum space parameter. I learnt that in order to solve them I should solve them in the Fourier space. I know also that I need to discretize these function in the “real ” space between {-L,+L} before applying the FFT or one of its relatives. Thank you for any suggestions or leads.

Hi to all community. I am trying to integrate a lengthy-expression but could not get the result after waiting of 1 and 2 hours even. is there any way to control such integration


 

Integration_Help.mw

 

 


 

 

Hi, 

This is the context                                                                                             
A mathematical expression f has been coded by a two stage process of the form 

(u and s are character strings)
I do not know what f is, but I know what P1, P2 are and I know s too. 
I would like to recover f.

Here is the particular couple of coding processes that I consider

f := sqrt(x);    # assumed to be unknown

u  := sprintf("%Zm", f);                     # "process" P1
s  := StringTools:-Encode(u,':-base64');     # "process" P2

# The "inverse" of P2 is
v := StringTools:-Decode( s, 'encoding' = ':-base64' );

# Does it exist an operation to recover f from v?


Thanks in advance

 

Hey there, I´m new to maple and running into some syntax issues when calculating the Euler-Lagrange equation.

The Euler Lagrange equation in general looks like this:

I´ve got  the Lagrangian for my task figured out:

Here´s the code for this line, be aware that the function definition part of this is not working.

L:=((x),(varphi),t)->(J)/(2)*(((x))/(R))^(2)+(`m__R`)/(2)(*(x))^(2)+(`m__p`)/(2)(((x)+l*(varphi)*cos(varphi))^(2)+(l*(varphi)*sin(varphi))^(2))+`m__p`*g*l*cos(varphi)

phi is obviously a function of t, I´m not sure if I should have written phi(t)

 

In the first step to solve the Euler-Lagrange, I have to partially differentiate L w.r.t xdot. preferably with a command something like the following:

How do I do that, how do I set L up to be able to do that? The way I defined the function above is not correct because xdot and phidot cant be used an argument apparently.

If all is working perfectly I´d be able to partially differentiate L w.r.t xdot, phidot, x, phi and subsequently be able to differentiate the first two w.r.t t again.

I´ll spare you the detail but I´ve tried for hours now with redefining xdot as xdot:= diff(x(t),t) and all sorts of other ways but nothing seems to really work.

 

Thanks for your help.

Hi,

I have three equations in terms of the following variables:

X,Y,X1, X2

How do I get an equation in terms of (X1,X2)  with Maple from Equations 1-3?

E.mw

A very simple question (by example):

Consider two polynomials g and h:

with(PolynomialTools):

g:=FromCoefficientList([1,2,3],x);

h:=FromCoefficientList([4,5,6,7],x);

 

What is the syntax for computing the composition of g with h? (As a polynomial.)

For instance, I would like to use CoefficientList on the result.

 

I know the @ operator and the subs command and have tried using them in various ways, but with no success.

(Of course, my question is general; the above is just an example.)

---

Edit: Additional question (which is my real question):

I'm writing a procedure that takes two polynomials g and h, and in which I define an unknown polynomial f. I want to compute its coefficients so that

f "composition" g = h

I write:

fCoeff:=seq(a[i],i=0..t) (to define the unknown coefficients. I can compute t.)

f := FromCoefficientList([fCoeff],x);

Then I would like to do something like:

comCoeff:=CoefficientList(f "composition" g,x)

If I have this, then I know how to solve for the unkown coefficients in f.

Hello. Tell me, please, is it possible to somehow remove the labels on the axes in Maple when plotting graphs? I mean labels 1, 2, 3 and so on. Thank you for your help.

Maple will give error when one tries to make a variable of the same name as a Maple command. Which is good ofcourse. So this gives an error

Vector:=5;

But Maple also uses hundreds of other names, as options, which are not protected like this. Even when adding this

adding interface(warnlevel=4);
kernelopts('assertlevel'=2):

There was no warning when a user makes a variable of same name as one of those Maple option names.

So if a user make a variable with such a name, it will cause serious problem. For example Vector constructor takes the name row as an option. But this name is not protected. So one can write  row:=5 and there is no warning generated by Maple.

Using Vector['row'] does not actually help. Here is an example, where Maple crashes due to this

restart;
interface(warnlevel=4);
kernelopts('assertlevel'=2):
A:=Matrix([[1,1],[2,3],[4,5]]);
row:=convert([a,b],Vector['row']);
res:=ArrayTools:-Concatenate(1,A,row); #this works, no problem

ArrayTools:-Concatenate(1,A,convert([a,b],Vector['row'])); #this will crash Maple

 

A workaround this, it to use double '' in the second call. Like this:

ArrayTools:-Concatenate(1,A,convert([a,b],Vector[''row''])); 

And if this to used again, to use

ArrayTools:-Concatenate(1,A,convert([a,b],Vector['''row'''])); 

And so on.  Ofcourse this is no way to do things.

So the user should not use row as variable name. May be use the_row instead, or a_row, and so on.

But this comes back to my question. The above is a made up example. How is the user supposed to remember there is some option used by Maple somewhere with such a name and avoid using it as a variable name? 

There are may be thousands of such names in Maple, with common names, like color and so on, and it is very easy to make a variable of this name by the user without noticing.

I also tried maplemint() and it gave no warning that a user variable have the same name as a Maple option name.

restart;
interface(warnlevel=4);
kernelopts('assertlevel'=2):

foo:=proc()
local A,row,res,a,b;
A:=Matrix([[1,1],[2,3],[4,5]]);
row:=convert([a,b],Vector['row']);
res:=ArrayTools:-Concatenate(1,A,row); #this works, no problem
ArrayTools:-Concatenate(1,A,convert([a,b],Vector['row'])); #this will crash Maple
end proc;

maplemint(foo);

foo()

 

Finally, I found that if I use Vector(:-row) instead of Vector('row'), then the crash goes away and now it works

restart;
interface(warnlevel=4);
kernelopts('assertlevel'=2):

foo:=proc()
local A,row,res,a,b;
A:=Matrix([[1,1],[2,3],[4,5]]);
row:=convert([a,b],Vector[:-row]);
res:=ArrayTools:-Concatenate(1,A,row); #this works, no problem
ArrayTools:-Concatenate(1,A,convert([a,b],Vector[:-row])); #this will now work
end proc;

foo();

But this worked because there was no global variable of the name row before calling foo. That is all. To make the above crash, all what I had to do is this
 

restart;
interface(warnlevel=4);
kernelopts('assertlevel'=2):

foo:=proc()
local A,row,res,a,b;
A:=Matrix([[1,1],[2,3],[4,5]]);
row:=convert([a,b],Vector[:-row]);
res:=ArrayTools:-Concatenate(1,A,row); #this works, no problem
ArrayTools:-Concatenate(1,A,convert([a,b],Vector[:-row])); #this will now work
end proc;

row:=5;
foo();

And now it crashes again.

This is all a big mess. Maple should warn users they are using variable of same name as Maple own option names, or make all Maple option names use some standard prefix. May be have them all start with or _ and have this special first letter be allowed only for Maple own use.

This will help prevent name clashes.

In Mathematica, this issue does not happen. Since all Mathematica names and symbols used, even as options, are protected or are strings. So no such possibility of name clash happen.

Is there a 100% robust way in Maple to prevent such name clash between user variable names and names used as options to Maple commands?

 

Hi!

There is some procedure/function to convert C code into maple code? For instance, the above text file

C_code.txt

contains the C code of this paper  http://www.dcs.bbk.ac.uk/~jkl/pubs/JL1_00a.pdf to compute the image of a point in [0,1] under the N-dimensional Hilbert curve and vice versa (i.e., given a point P in the N-dimensional cube [0,1]^{N} find the point t in [0,1] such that t is mapped into P under the Hilbert curve)

Unfortunately, I don't know anything about the C programming language.

Many thanks in advance for your comments.

Fyi, there seems to be some problem here

Maple 2020.2 with Physics 897

restart;
interface(warnlevel=4):
kernelopts('assertlevel'=2):
eq:=exp(x)*sin(y(x))-3*x^2+(exp(x)*cos(y(x))+(1/3)/y(x)^(2/3))*(D(y))(x) = 0;
timelimit(30,solve(eq,y(x)));

 

Full screen shot:

 



Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/solve_error.mw .
 

Download solve_error.mw

Hi,

I noticed that, in Maple 2020.2, the caracters seem smaller. As if the zoom had somewhat been reduced (a bit).

However, in the preferences, the default zoom level I would like is between 100 and 125% (something like 110%) (since the default zoom level is adjusted by steps of +/- 25%). I wondered if there was a way to set the default zoom level to an arbitrary value. In fact I thought it would be great to have a field instead of a list of choices, so we can choose a custom value.

Thank you

I was trying to plot a simple degree two curve but with one point removed. My first attempt was the following;

p1 := plot(x^2 - 1, x = -2 .. 2);
p2 := plot([[0, -1]], style = point, symbol = circle, symbolsize = 20);
plots[display](p1, p2);

But the curve line is shown even inside the circle of the removed point. Changing order of `p1` and `p2` in `plots[display]` doesn't make any changes on the output.

My second attempt was the following.

p3 := plots[display](plottools[disk]([0, -1], 0.1, color = white)):
plots[display](p1,p3);

This didn't help either.

Is there a way to tell Maple to compute an integral over a domain defined by an implicit condition?

A trivial example would be: integrate 1 over the 2D domain defined by x^2+y^2<=1.

I know it's possible to write the explicit double integral

int(int(1,y=-sqrt(1-x^2)..sqrt(1-x^2)),x=-1..1);

Or even as a single integral:

integrate(2*sqrt(1-x^2),x=-1..1);

However, it's not always possible to do this explicitly, depending on the form of the relation f(x,y)=0 defining the domain.

 

My idea was:

int(Heaviside(1-x^2-y^2),[x=-1..1,y=-1..1]);

But Maple returns 0. However, evalf/Int returns the correct numerical value of Pi.

 

Hi,

Is there a way to keep the fractional form of probabilities? I tried with InertForm without success. thanks

ARBREprobabilité.mw

First 338 339 340 341 342 343 344 Last Page 340 of 2308