MaplePrimes Questions

Hello dear!

Hope you all are fine. I am trying to sloution the system of nonlinear system of ODEs (see attached file) but my solutions not converging please see and fix the problem. I am waiting your quick response.

Graph.mw

Is there a possiblity to print exponents in the axis labeling?

Say I have large numbers in 10^6. Then I want to write

labels=["x","y [10^6]"]

However I only found the e-notation within

sprintf("%0.0e", 10^6)

for example, which is not really what I want though.

applyrule((x::anything < y::anything) = 0, a < b);
applyrule('x::anything < y::anything' = 0, a < b);
applyrule(`<`(x::anything, y::anything) = 0, a < b);
applyrule('`<`(x::anything, y::anything)' = 0, a < b);
                             a < b
                             a < b
                             a < b
                               0

All quotes matter, no doubt, but why is `<` different from the infix "<" and why does it need uneval?

 

restart; CodeTools:-Usage(plots:-inequal({abs(abs(x-y)-abs(x+y)) >= 2*y-x+1, (x+1)^2+(y+1)^2 <= 2}, 
optionsimplicit = [gridrefine = 2, rational = true], x = -3 .. 1, y = -3 .. 0., scaling = constrained));

memory used=0.57GiB, alloc change=184.01MiB, cpu time=16.22s, real time=17.24s, gc time=1.58s

?

Mathematica 11.2.0.0 says

113053/146523-8/169 sqrt(22)+32/289 sqrt(30)-3/169 sqrt(214-24 sqrt(22))-
2/169 sqrt(1177-132 sqrt(22))-1/289 sqrt(94-16 sqrt(30))-
4/289 sqrt(705-120 sqrt(30))+1/146523 293046(Pi)-
arcsin(1/13 sqrt(2) (3+sqrt(22)))-arcsin(1/17 sqrt(2) (1+2 sqrt(30)))

(see Area.pdf).

I have a big vector composed of different real values elements. I want to extract the value of elements that are between specified interval (x1<val<x2) and their corresponding element numbers. How is it possible in Maple in simplest way?

For example suppose R:=[ 4,-1,9,11,-4,2,4,1,-1,2.2,112,44,-134,0.124,34,41,7,97,13.22123]:

I want the elements that their values are in the interval of -2<val<3 and their corresponding element numbers. 

Namely: vals:=[-1,2,1,-1,2.2,0.124] and their corresponding numbers: Numbs:=[2,6,8,9,10,14]

Hello, 

I want to insert a histogram for weighted data in my  question Maple TA. I have difficulties in my code. 

Some ideas?

Thks

I searched the questions for an answer before posting and found that I had asked the question 10 years ago! I still do not understand although it appears every other Maple user does. Embarrassing!
 

I have done some time consuming computations in my worksheet and would like to save the results for further investigation. Let's say, for example, that I have a long list L of numbers, strings etc, and a very large Matrix A . I am working on a Mac running 10.12.6.
From reading the documentation many times I gather that I can create a file with the values of L and A. I might then be able to open another worksheet and read the values of L and A into that worksheet but I cannot figure out how to do that.

Here are some of the (unhelpful) error messages I get using toy examples:

after creating a text file by hand

> read "testZ";
Error, unable to read `testZ` 

or

read testn. txt;
Error, read must have a file name

ro

read "Users/awass/Desktop/testn";
Error, unable to read `Users/awass/Desktop/testn`
 

So, how do I write my info to a file? Must I somehow create the file before I save?
Where should that file be placed? Desktop? Folder?
How do I read from the file after I have saved.
Can I save both L and A to the same file? Do I need 2 commands?

I would appreciate some explicit toy examples. Many thanks.
 

 

 

 



 

How do i plot

in one plot with this paraellogram (it has to come out of the center of it)

How to get a function value for this HPM code. in the equations p-value 0 to N also some problem.

 

Still in Maple 2017 the palette is almost not readable without the help of a magnifier under a UHD screen (3840x2160) resolution. I have set all things which could be set for scaling and sizing, no effect on the palette. With the trend to higher resoluiton screen this should be fixed in the near future - or is there any work around?

https://gist.github.com/hoyeunglee/b0c6b61fafd1bee988fcafef3cfe6025
https://gist.github.com/hoyeunglee/a1e0ca335be8bbc8fde301c6aded66f8

test1 = o(a(x,y),z)

test1.args[0]

python sympy can not get function name o and a

Hi. I am using JetCalclulus to prolong infinitesimal generators.

Then I want to find invariants, it means I want to act on some function by these differential operators and to solve linear PDEs.

Is it possible to do it automatically?

restart;
with(Groebner):

DoExist := proc(tau, n)
if rtable_num_elems(tau) >= n then
	return tau[n];
else
	return 0;
end if;
end proc;

IsZero := proc(a, b)
if a=0 then 
	return 0;
else 
	return a/b;
end if
end proc;

g1 := x^2-w*y;
g2 := x*y - w*z;
g3 := y^2 - x*z;
gro := Basis([g1,g2,g3],plex(x,y,z,w));

X1 := `*`(LeadingTerm(g1, tdeg(x, y, z, w)));
X2 := `*`(LeadingTerm(g2, tdeg(x, y, z, w)));
X3 := `*`(LeadingTerm(g3, tdeg(x, y, z, w)));
X12 := lcm(X1,X2);
X13 := lcm(X1,X3);
X23 := lcm(X2,X3);
S12 := SPolynomial(g1, g2, lexdeg([x, y, z, w]));
S23 := SPolynomial(g2, g3, lexdeg([x, y, z, w]));
S13 := SPolynomial(g1, g3, lexdeg([x, y, z, w]));
e1 := Vector([1,0,0]);
e2 := Vector([0,1,0]);
e3 := Vector([0,0,1]);
eq1:= S12 = h121*g1 + h122*g2 + h123*g3;
eq1 := S12 - expand(h121*g1 + h122*g2 + h123*g3):
NormalForm(eq1, Basis([g1, g2, g3], tdeg(x, y, z, w, h121, h122, h123)), tdeg(x, y, z, w, h121, h122, h123), 'Q');
h121 := 0;
h122 := 0;
h123 := 0;
s12 := IsZero(X12,X1)*e1-IsZero(X12,X2)*e2-Vector([DoExist(<Q>,3), DoExist(<Q>,2), DoExist(<Q>,1)]);

eq1 := S13-expand(h131*g1+h132*g2+h133*g3):
NormalForm(eq1, Basis([g1, g2, g3], tdeg(x, y, z, w, h131, h132, h133)), tdeg(x, y, z, w, h131, h132, h133), 'Q');
h131 := 0;
h132 := 0;
h133 := 0;
s13 := IsZero(X13,X1)*e1-IsZero(X13,X3)*e3-Vector([DoExist(<Q>,3), DoExist(<Q>,2), DoExist(<Q>,1)]);

eq1:= S23 - expand(h231*g1 + h232*g2 + h233*g3);
NormalForm(eq1, Basis([g1, g2, g3], tdeg(x, y, z, w, h231, h232, h233)), tdeg(x, y, z, w, h231, h232, h233), 'Q');
h231 := 0;
h232 := 0;
h233 := 0;
s23 := IsZero(X23,X2)*e2-IsZero(X23,X3)*e3-Vector([DoExist(<Q>,3), DoExist(<Q>,2), DoExist(<Q>,1)]);

with(LinearAlgebra):
#F = Syz*GrobnerBasis
F := simplify(MatrixMatrixMultiply(Matrix([[s12[1],s13[1],s23[1]],[s12[2],s13[2],s23[2]],[s12[3],s13[3],s23[3]]]), Matrix([[gro[1]],[gro[2]],[gro[3]]])));
F[1][1] - g1 = 0; 
F[2][1] - g2 = 0;
F[3][1] - g3 = 0;
F := simplify(MatrixMatrixMultiply(Matrix([[s12[1],0,s23[1]],[s12[2],0,s23[2]],[s12[3],0,s23[3]]]), Matrix([[gro[1]],[gro[2]],[gro[3]]])));
F[1][1] - g1 = 0; 
F[2][1] - g2 = 0;
F[3][1] - g3 = 0;

#F = GrobnerBasis*Syz
F := simplify(MatrixMatrixMultiply(Matrix([[gro[1],gro[2],gro[3]]]), Matrix([[s12[1],s13[1],s23[1]],[s12[2],s13[2],s23[2]],[s12[3],s13[3],s23[3]]])));
F[1][1] - g1 = 0; 
F[1][2] - g2 = 0;
F[1][3] - g3 = 0;
F := simplify(MatrixMatrixMultiply(Matrix([[gro[1],gro[2],gro[3]]]), Matrix([[s12[1],0,s23[1]],[s12[2],0,s23[2]],[s12[3],0,s23[3]]])));
F[1][1] - g1 = 0; 
F[1][2] - g2 = 0;
F[1][3] - g3 = 0;

#F = GrobnerBasis*Syz
F := simplify(MatrixMatrixMultiply(Matrix([[gro[1],gro[2],gro[3]]]), Matrix([[s12[1],s12[1],s12[1]],[s13[2],s13[2],s13[2]],[s23[3],s23[3],s23[3]]])));
F[1][1] - g1 = 0; 
F[1][2] - g2 = 0;
F[1][3] - g3 = 0;
F := simplify(MatrixMatrixMultiply(Matrix([[gro[1],gro[2],gro[3]]]), Matrix([[s12[1],0,s12[1]],[s13[2],0,s13[2]],[s23[3],0,s23[3]]])));
F[1][1] - g1 = 0; 
F[1][2] - g2 = 0;
F[1][3] - g3 = 0;

syz result is s12, s23

but after verify, F is not equal to GrobnerBasis*Syz

 

restart

with(PDEtools)

declare(u(x, t))

` u`(x, t)*`will now be displayed as`*u

(1)

U := diff_table(u(x, t))

char := eta(x, t, U[])-U[x]-2*U[t]

eta(x, t, u(x, t))-(diff(u(x, t), x))-2*(diff(u(x, t), t))

(2)

       

pde := U[x]+U[x, x]

diff(u(x, t), x)+diff(diff(u(x, t), x), x)

(3)

tp1 := subs(U[] = char, pde)

diff(eta(x, t, u(x, t))-(diff(u(x, t), x))-2*(diff(u(x, t), t)), x)+diff(diff(eta(x, t, u(x, t))-(diff(u(x, t), x))-2*(diff(u(x, t), t)), x), x)

(4)

 

Just as the result above, I can't interpret why the last term of the formula (4) is (2)_xx.

 

Is ther a bug, or just because I made a mistake somewhere???

``

Thanks!

``

``

``

``

``

``


 

Download err_subs.mw

equations:
x[j-1]-2x[j]+x[j+1]=0, j=3...98 where x[j] is x-sub -j
-2x[1]+x[2]=5
x[1]-2x[2]+x[3]=-4
x[98]-2x[99]+x[100]=-8
x[99]-2x[100]=13
 
I'm trying to solve them using Isaac Newton's method for numerical approximation with epsilon equal to 1e-6 such in C++ code below
 
double epsilon=1e-6;
double x=1.0;
double f=x[j-1]-2x[j]+x[j+1] j=3...98; x3-x97+x98=3;
double Df=1-2+1;
while (fabs(f)>epsilon){
cout<<x<<endl;
x-=f/Df
f=x[j-1]-2x[j]+x[j+1] j=3...98; x3-x97+x98=3;
Df=1-2+1;}
cout<<x<<endl;
First 916 917 918 919 920 921 922 Last Page 918 of 2428