Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I only just noticed the Start.mw file being always number 1 in my Recent document list.  I don't recall it being there, ever, and I don't think it should.  Why is it there now?  Anyone else have this?

I am trying to show visually how many Lie derivatives of two different objects are needed to get a unique solution to a problem, so i want to create a graph of the form:


for the elements of this workseet:
3d_plot_of_Lie_derivatives_against_numelems.mw

Ok the error message I originally recieved in requesting 'expression' rather than 'value' was telling me the input is ambigous, isn't exactly helpful.

With the uploaded worksheet as last attempted, it gives the error of something about an invalid sequence, but still and I honestly do not see how when MathML is an XML application, surely whatever is put into the math container is retrievable considering XML applications are based on just handling the rendering of symbols.

 

Anyway I can only post here seeings that following the link for error messages rarely opens an actual help page in the brower, it simply tells you there is no help page for that error.

 


 

MathML[ImportModified](DocumentTools[GetProperty]('IIRN_CONTENT15', 'value'))

Error, (in MathML:-ImportModified) Typesetting:-merror("invalid sequence")

 

MathML[ImportModified](DocumentTools[GetProperty]('IIRN15', 'value'));

808066846690

(1)

 

``


 

Download 26052018.mw

Hellow,

how to write the codes for linear Lagranges piecewise polynomial in the interval x=[0,1] by taking h=0.1. 

if we fix h=0.1 automatically it should take the polynomial like these sample

x<0.1,(x-1)/0.2,x<0.2,(x^2-3x)/0.2,..... so on

 

In as much as the embedded component suite is a brilliant tool for the custom design of online educational programs, student tests, etc, my purposes are orientated around encouraging and assisting of self directed investigation, with the utilization of the packages of maple, but in a manner that allows the user to neglect the requirement to have any knowledge of maple code itself, allowing them to focus entirely on their discipline of choice. 

So because the content the user will enter into the interface I am designing is naturally going to be quite variant from individual to individual, one of the  necessary properties that does not exist is for the math containers to have the option of being resizeable at the discretion of the user.

At the moment, I have added buttons that allow the user to resize the window by pressing one of four buttons entitled "increase height". "decrease height", "increase width" and "decrease height". This will suffice for my first working prototype but i just feel that it would be much neater if it were possible to resize the math component directly, and some option of the neighbouring embedded components to either shift their position accordingly, or maintain rectilinear alignment with the greater proportion of other components by all embedded components shifting accordingly when one math container is resized.

 

Dear sir,

I want to plot the graph of Differential Equation numerically and other equation by changing the parameter values beta=2,2.5,5 . i am writing an sample codes and graph. the range of x is 0,..0.1

Eq1:=diff(y(x), x, x)+beta*y(x) = 0, y(1) = sin(1), (D(y))(1) = cos(1):
Eq2:=y=beta*e^x+sin(2*x)+x^2:

 

In the same vein as my last question, I need to bang out function symbols depending on a variable list of parameters, and refer to them later. I'm currently doing this:

PW > FunGen := symb -> PDETools[declare](symb(w1, w2, x1, y1), symb);
F > F0 := [b, seq(cat(r, i), i = 1 .. k), seq(cat(s, i), i = 1 .. k)];
                          [b, r1, s1]
PW > map(FunGen, F0);
          b(w1, w2, x1, y1) will now be displayed as b
         r1(w1, w2, x1, y1) will now be displayed as r1
         s1(w1, w2, x1, y1) will now be displayed as s1
F > dx := i -> 'eval(cat(dx, i))';
dy := i -> eval(cat(dy, i));
r := i -> parse(cat(r, i, "(w1,w2,x1,y1)"));
s := i-> parse(cat(s, i, "(w1,w2,x1,y1)"));
epsilon := i -> cat(epsilon, i);
F > bb := parse(cat(b, "(w1,w2,x1,y1)"));

I generate the function aliases for r,s,b depending on w1,w2,x1,y1, and refer to them later with 'r(i)', 's(i)' and bb. In general however, the number of x's and y's is variable (depending on k).

What I would like to do is something like

F > args := w1, w2, seq([x || i, y || i][], i = 1 .. k);
                         w1, w2, x1, y1
PW > FunGen := symb -> PDETools[declare](symb(args), symb)
r := i -> (cat(r, i)(args)
...

This does now however work, even though cat(r, i)(args) on a standalone line does indeed produce ri(w1, w2, x1, y1) and correctly parses to r1, etc.

Hi All,

I recently switched from Maple 18 to Maple 2018. I was trying to execute and old worksheet created with Maple 18 in which a DAE have to be solved numerically. In Maple 18 the worksheet works flawlessly whereas Maple 2018 throws 'Error, (in dsolve/numeric/process_input) invalid specification of initial conditions...'

Initial conditions are given in the form {x1(0) = 1, x2(0) = 2, D(x1)(0) = 1, D(x2)(0) = 0 ....} and are the same in both cases ( I merely executed without any modification the same worksheet in the two Maple versions).

I feel I've missed out something in the changelog... any idea on what is happening?

PS. call to dsolve

dsolve(dsys_numeric, numeric, implicit = true, stiff = true, optimize = true, compile = true):
 

 

 

Hi,

This is a notional example

1/ I define a matrix through some procedure, for instance
p := k -> Matrix(3, 3, (i,j) -> i+j+k mod 3)

2/ Now I would like to animate the plot of matrices p(k) for successive values of k.
The red commend below doesn't work
N := 5:
plots[animate](Statistics[HeatMap], [ p(k) ], k=0..N, frames=N+1);


Could you please help me to fix this ?
TIA

 

 

Dear sir

 I am facing the problem with executing the program with Maple13. The software problem is maple13 is not executing the programs and showing the dialogue box as waiting for the kernel. Actually, what is this kernel, which is not understanding me? So please can anyone do a favor in this regard? How to connect to the kernel? 

Hi Guys :)

 

I need some Help with solving a nonlinear system. 

I have 3 equations.

These 3 equations have 7 unknown variables in it. But 5 of them are constants which I don't want to solve. I just want to solve three of them.

I tried it with fsolve but I always get the error :

fsolve({eq1, eq3, eq5}, {a, b, c});
%;
Error, (in fsolve) {eq1, eq3, eq5} are in the equation, and are not solved for

 

i tried to define the variables as Parameters but then i get this error: 

Parameters(t1, t2, t3, t4, t5, t6, t7, b1, t, v1, v2, s1, s2, j, a, b, c);

fsolve({eq1, eq3, eq5}, {ca, cb, cc});
%;
Error, (in fsolve) {b1, eq3, eq5, j, t, t1, t2, t3, t4, t5, t6, t7} are in the equation, and are not solved for


Here is the script : Non-Linear_system.mw

 has sb an Idea?

 

I'm trying to define a monomial order - Monomials are first compared by their weighted degree, with ties broken by pure lexiocraphic order (plex). I want the monomial order just to find the LeadingTerm of polynomials.

Maple has wdeg(W,V) as a built in monomial order, which compares monomials first by their weights, but breaks ties using reverse lexicographic order (tdeg).

One way I could plausibly do this is using the 'matrix' constructor, and defining the plex order by a succession of weights, but this seems like overkill, and I would have a n*n matrix, where I'd like n to reach over 1000.

Is anyone aware of a simple way of defining such a monomial order?

result3.mw
 

NULL

with(LinearAlgebra); restart; delta := 0.407e-9; C := 2023.2; L := 5*delta

0.2035e-8

(1)

eq := (1/12)*delta^2*S^4+S^2+omega^2/C^2

0.1380408333e-19*S^4+S^2+0.2442993814e-6*omega^2

(2)

solve(eq, S)

0.7244233290e-6*(-0.6902041665e32+2760816666.*(-0.8430822546e19*omega^2+0.6250000000e45)^(1/2))^(1/2), -0.7244233290e-6*(-0.6902041665e32+2760816666.*(-0.8430822546e19*omega^2+0.6250000000e45)^(1/2))^(1/2), 0.7244233290e-6*(-0.6902041665e32-2760816666.*(-0.8430822546e19*omega^2+0.6250000000e45)^(1/2))^(1/2), -0.7244233290e-6*(-0.6902041665e32-2760816666.*(-0.8430822546e19*omega^2+0.6250000000e45)^(1/2))^(1/2)

(3)

U := _C1*exp(sqrt(-2*C*(3*C-sqrt(-3*delta^2*omega^2+9*C^2)))*x/(C*delta))+_C2*exp(-sqrt(-2*C*(3*C-sqrt(-3*delta^2*omega^2+9*C^2)))*x/(C*delta))+_C3*exp(sqrt(-2*C*(3*C+sqrt(-3*delta^2*omega^2+9*C^2)))*x/(C*delta))+_C4*exp(-sqrt(-2*C*(3*C+sqrt(-3*delta^2*omega^2+9*C^2)))*x/(C*delta))

U2 := diff(U, x)

1214414.026*_C1*(-24560029.44+4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*exp(1214414.026*(-24560029.44+4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*x)-1214414.026*_C2*(-24560029.44+4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*exp(-1214414.026*(-24560029.44+4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*x)+1214414.026*_C3*(-24560029.44-4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*exp(1214414.026*(-24560029.44-4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*x)-1214414.026*_C4*(-24560029.44-4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*exp(-1214414.026*(-24560029.44-4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*x)

(4)

A := simplify(Matrix(4, 4, [[coeff(subs(x = 0, U), _C1), coeff(subs(x = 0, U), _C2), coeff(subs(x = 0, U), _C3), coeff(subs(x = 0, U), _C4)], [coeff(subs(x = L, U), _C1), coeff(subs(x = L, U), _C2), coeff(subs(x = L, U), _C3), coeff(subs(x = L, U), _C4)], [coeff(subs(x = L, U2), _C1), coeff(subs(x = L, U2), _C2), coeff(subs(x = L, U2), _C3), coeff(subs(x = L, U2), _C4)], [coeff(subs(x = 0, U2), _C1), coeff(subs(x = 0, U2), _C2), coeff(subs(x = 0, U2), _C3), coeff(subs(x = 0, U2), _C4)]]))

Matrix(%id = 18446746958277761134)

(5)

solve(Determinant(A) = 0)

Warning,  computation interrupted

 

NULL

NULL

``


 

Download result3.mw
 

NULL

with(LinearAlgebra); restart; delta := 0.407e-9; C := 2023.2; L := 5*delta

0.2035e-8

(1)

eq := (1/12)*delta^2*S^4+S^2+omega^2/C^2

0.1380408333e-19*S^4+S^2+0.2442993814e-6*omega^2

(2)

solve(eq, S)

0.7244233290e-6*(-0.6902041665e32+2760816666.*(-0.8430822546e19*omega^2+0.6250000000e45)^(1/2))^(1/2), -0.7244233290e-6*(-0.6902041665e32+2760816666.*(-0.8430822546e19*omega^2+0.6250000000e45)^(1/2))^(1/2), 0.7244233290e-6*(-0.6902041665e32-2760816666.*(-0.8430822546e19*omega^2+0.6250000000e45)^(1/2))^(1/2), -0.7244233290e-6*(-0.6902041665e32-2760816666.*(-0.8430822546e19*omega^2+0.6250000000e45)^(1/2))^(1/2)

(3)

U := _C1*exp(sqrt(-2*C*(3*C-sqrt(-3*delta^2*omega^2+9*C^2)))*x/(C*delta))+_C2*exp(-sqrt(-2*C*(3*C-sqrt(-3*delta^2*omega^2+9*C^2)))*x/(C*delta))+_C3*exp(sqrt(-2*C*(3*C+sqrt(-3*delta^2*omega^2+9*C^2)))*x/(C*delta))+_C4*exp(-sqrt(-2*C*(3*C+sqrt(-3*delta^2*omega^2+9*C^2)))*x/(C*delta))

U2 := diff(U, x)

1214414.026*_C1*(-24560029.44+4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*exp(1214414.026*(-24560029.44+4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*x)-1214414.026*_C2*(-24560029.44+4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*exp(-1214414.026*(-24560029.44+4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*x)+1214414.026*_C3*(-24560029.44-4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*exp(1214414.026*(-24560029.44-4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*x)-1214414.026*_C4*(-24560029.44-4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*exp(-1214414.026*(-24560029.44-4046.4*(-0.496947e-18*omega^2+36840044.16)^(1/2))^(1/2)*x)

(4)

A := simplify(Matrix(4, 4, [[coeff(subs(x = 0, U), _C1), coeff(subs(x = 0, U), _C2), coeff(subs(x = 0, U), _C3), coeff(subs(x = 0, U), _C4)], [coeff(subs(x = L, U), _C1), coeff(subs(x = L, U), _C2), coeff(subs(x = L, U), _C3), coeff(subs(x = L, U), _C4)], [coeff(subs(x = L, U2), _C1), coeff(subs(x = L, U2), _C2), coeff(subs(x = L, U2), _C3), coeff(subs(x = L, U2), _C4)], [coeff(subs(x = 0, U2), _C1), coeff(subs(x = 0, U2), _C2), coeff(subs(x = 0, U2), _C3), coeff(subs(x = 0, U2), _C4)]]))

Matrix(%id = 18446746958277761134)

(5)

solve(Determinant(A) = 0)

Warning,  computation interrupted

 

NULL

NULL

``


 

Download result3.mw

 

 

I am trying maplemint for first time, but some of the messages it generates do not seem to make sense to me and they all seem to be false alarms.

And not sure how make maplemint generate true warnings to make it easier to filter the real problems from the not real ones. For example, I made some module to try

my_module:=module()

export foo;
local  f,A,n,x;

#private stuff here
f:= x -> x^2:

A := int(f(x)*sin(n*x),x=0..Pi) assuming n::integer;

#public stuff here
foo:= proc()
        A;
end proc;     
    
end module;

maplemint(my_module) generates

Module my_module() 
  These local variables were never used:  x
  These local variables were used but never assigned a value:  n
  These local variables were assigned a value, but otherwise unused:  f

Well, "x" is clearly used. It is the integration variable?  And I can't assign value to "n", it is just a symbol used in the symbolic integration and assumed to be integer.

It also says "f" is not used. But "f" is used in definition of "A" inside the integrand.

So all these messages are not really needed. Is there a way to make maplemint not generate these? I do not see how I could change the code to remove these messages. Is something wrong with my code above?

Code works as expected

my_module:-foo();  gives (-Pi^2*(-1)^n*n^2+2*(-1)^n-2)/n^3

Here is another simpler example of where maplemint messages can't be removed no matter what.

restart;
foo:= proc()
	 local x;
	 plot(sin(x),x=-Pi..Pi);
end proc;     

and maplemint(foo) gives

Procedure foo()
  These local variables were used but never assigned a value:  x

restart;
boo:= proc()	
	 plot(sin(x),x=-Pi..Pi);
end proc;

And now

maplemint(boo);
Procedure boo()
  These names were used as global names but were not declared:  x

Here is another example where maplemint complains about option names for plot3 being undeclared

restart;
foo:= proc()	
    local p,x,y;
    p:=plot3d(sin(x)*cos(y),x=0..Pi,y=0..Pi,
              axes = none, projection=0.9, 
              orientation=[-30,55,0], scaling=unconstrained
              ):
    p:
end proc:

And

maplemint(foo);
Procedure foo()
  These names were used as global names but were not declared:  
     axes, none, orientation, projection, scaling, unconstrained

  These local variables were used but never assigned a value:  
       x, y

If one has to go each time through 100's of messages like these in order to find 1 or 2 real ones which indicate real problems, then using maplemint is not going to an effective way to find problems in code.

I just feel that if at least one person less experienced than me reads this it will be a worth while post, because it will help them avoid things that eluded me when I was younger.


 

The omitted function definitions are not relevant to the reason for which I decided to post about this. I would like the maple user to simply observe how many variables are involved in the relation's (R) three equalities in the consideration of the output.

 

The reason I believe this is important, is that it is sometimes very easy to believe induction is sufficient proof of the truth value of a relation over the superset of a subset that has been enumerated, much like the example of the coefficients of the
"105^(th) cyclotomic polynomial if one were to inductively reason statements about the coeffiecents of the previous 104 polynomials."

 

 

A[n, k, M] = abs(C[0](n, k, M))/abs(C[1](n, k, M)); B[n, k, M] = abs(C[0](n, k, M))/abs(C[2](n, k, M)); E[n, k, M] = abs(C[1](n, k, M))/abs(C[2](n, k, M))

R

"`&nscr;`(A[n,k,M])=`&nscr;`(B[n,k,M]), `&nscr;`(E[n,k,M])=`&dscr;`(A[n,k,M]),`&dscr;`(B[n,k,M])=`&dscr;`(E[n,k,M])]"

for t to 7 do R(t, 2, 30) end do

[1 = 1, 1 = 1, 1 = 1]

 

[1 = 1, 1 = 1, 1 = 1]

 

[1 = 1, 1 = 1, 1 = 1]

 

[1 = 1, 1 = 1, 1 = 1]

 

[1 = 1, 1 = 1, 1 = 1]

 

[1 = 1, 1 = 1, 1 = 1]

 

[1 = 11^(1/2)*7^(1/2), 11^(1/2)*7^(1/2) = 1, 7 = 7]

(1)


 

Download INDUCTION_IS_NOT_YOUR_FREN.mw

First 829 830 831 832 833 834 835 Last Page 831 of 2242