MaplePrimes Questions

I'm trying to evaluate function like this , but  D(x) always returns 0, is  there any way to evaluate the function ? 

 

f := proc (x) options operator, arrow, function_assign; piecewise(x < 0, 3^(-(1/3)*x^2), .5*2^(5^(-x))) end proc;
R(x) := int(f(t), t = x .. x+l):
L(x) := int(f(t), t = x-l .. x):
D(x) := (R(x)-L(x))/(R(x)+L(x)):

 

why

expr:=1-3*y;
patmatch(expr, b::integer - a::integer*y,'la');

gives false but

expr:=1-3*y;
patmatch(expr, b::integer + a::integer*y,'la');

gives true?

Should one then use `+` for matching with `+` and `-`? This result was a little confusing to me. 

It is actually good that it behaves this way. Makes it easier to write the pattern (less cases to cover). But I would have expected both to return true, that is all.

I found I can start Maple itself 2 times on my windows PC. (I think my license allows max of 2, but I could be wrong).

I want to run a program which takes long time. But I want to use Maple at same time.

Which is the recommended approach:

1) Start 2 separate Maple applications. Use one to run the long program, and then I can use the second Maple for other things while the first is running)

2) Start one Maple, but set the "How should Maple handle the create of new Math engine" to "Ask me each time"

for me, choice 1 seems more safe. But thought to ask if there is something else I should consider when making which choice to pick.

Update

Found out that actually when clicking on Maple icon, I was not starting a new Maple at all. It was just starting a new worksheet using the currently running Maple ! This is confusing. With Mathematica, clicking on its icon actually starts a new complete separate Mathematica application. Not a new notebook using the currently running Mathematica.

So the question I have now is: Can one start 2 separate Maple applications on windows?  And if so, how?

How to calculate the following at point p=(xo,yo):

       n . del(u), u=u(x,y)

from the known function u, where n is the unit outward normal at p and the dot represents the dot product.

The objective is to create example PDE problems with Neumann BCs on irregular 2D domains.

Why does

MultiSeries:-series(LegendreQ(-1/2,x),x=-1))

not work?

series(LegendreQ(-1/2,x),x=-1))

seems to work, but does it give the correct result?

I actually thought there was a pole at -1.

Thx

PS: or is the cut between -1 and 1 with both logarithmic singularities?

I'm still wondering about the behaviour of MultiSeries

As an example question, I am trying to learn a method for assertaining whether a Set with a given predicate is finite or infinite.

 

For example, is $S$ infinite or finite, if it is defined as:

 

$$S={\biggl\{k \in \mathbb N:\biggl\lfloor {\frac {{k-1}}{{2}
}} \biggr\rfloor-\biggl\lfloor {\frac {{\ln(\pi^{k})}}{{\ln(10)}
}} \biggr\rfloor=0}\biggr\}$$
 

hey gauys,

I have a problem with solving an equation. How can i obtain an analytical solution for that ?rootof.mw

Thanks

 

 

is there a way  for a proc() in a parent module to call an exported proc in a child module, without having to use long form of the call    child:-child_proc() and just do child_proc()?  Here is an example

A:=module()
  option package;
  export foo;
  local B; #child module

  B:=module()     
     export boo;
     boo:=proc()
        print("in B:-boo()");
     end proc;
  end module;
  
  foo:=proc()
     B:-boo();  #how can one just type  boo() here?
  end proc;
end module;

B:-foo(); now works ok. But I'd like to just use  boo() and not B:-boo() since the name of the child module is too long. 

I can't figure how to do it. I can't use with(B) in the parent, Maple complains. 

 

I have this maple code:
I want to change

back to α. How can i do it ? (it don't work with unprotect)

 

 

I do the numerical simulation with

lp:=dsolve(....,type = numeric, range = ta .. te)

The simulation stop at t=te .

I want to stop the simulation when e.g. x(t) < 0

How can i do it ?

 

I use
lp1=dsolve(...,numeric)
p1 := odeplot(lp1,....)

new parameter

lp2=dsolve(...,numeric)
p2 := odeplot(lp2,....)

display([p1, p2], legend = ["step", "impulse"])

anf get the error

 

Error, (in plots:-display) display does not accept the legend option

 

 

 

 

Hi 

I have a question about function as parameter in procedure

is it possible that I type 

f := x-> x+1

Test (f(x))

instead of Test(f) ? 

where Test is a simple procedure that takes in one function parameter 

Test := proc (f)
return f(1) + f (2) 

 

    Hello, colleagues!

    I want to find zero function given by the process that integrates the ODE, but get this warning and do not know what to do with it.  I will be grateful to any advice!!!

T0 := 300; G1 := 1.2*10^6; G2 := 1.2*10^6; k := 1.79333595*10^(-6); l := 1/(12*10^4); U_max := 5.0; th0 := .5; q0 := 0.1e-2:

u(x):=piecewise(x<=-1,-U_max,x>1,U_max,x<=1 and x>-1,0): 

sys := diff(x1(t), t) = x2(t),
           diff(x2(t), t) = l*u(x4(t))-k*sin(2*x1(t)),

           diff(x4(t), t) = -x3(t),

            diff(x3(t), t) = 2*k*cos(2*x1(t))*x4(t);


init:=x1(0)=th0,   x2(0)=q0: 

h1 := proc (t1, alpha_1, alpha_2, th_0, q_0, g1)::float;
local X1, X3, Res;
ptions operator, arrow;
global sys, u;
X1 := eval(x1(t), dsolve({sys, x1(0) = th_0, x2(0) = q_0, x3(0) = alpha_1, x4(0) = alpha_2}, numeric, range = 0 .. t1, output = listprocedure));
X3 := eval(x3(t), dsolve({sys, x1(0) = th_0, x2(0) = q_0, x3(0) = alpha_1, x4(0) = alpha_2}, numeric, range = 0 .. t1, output = listprocedure));
es := X3(t1)+2*g1*X1(t1);
return Res end proc

h2 := proc (t1, alpha_1, alpha_2, th_0, q_0, g2)::float;
local X2, X4, Res;
options operator, arrow;
global sys, u;
X2 := eval(x2(t), dsolve({sys, x1(0) = th_0, x2(0) = q_0, x3(0) = alpha_1, x4(0) = alpha_2}, numeric, range = 0 .. t1, output = listprocedure));
X4 := eval(x4(t), dsolve({sys, x1(0) = th_0, x2(0) = q_0, x3(0) = alpha_1, x4(0) = alpha_2}, numeric, range = 0 .. t1, output = listprocedure));
Res := X4(t1)+2*g2*X2(t1);
return Res
end proc

Test_h1 := proc (x, y)::float;
h1(10.0, x, y, 0.209327944398961e-2, -0.417641536045032e-3, G2)
end proc;

Test_h2 := proc (x, y)::float;
h2(10.0, x, y, 0.209327944398961e-2, -0.417641536045032e-3, G2)
end proc

fsolve([Test_h1, Test_h2]);
Warning, unable to store _EnvDSNumericSaveDigits when datatype=integer[8]
Test_2.mw

Can someone help me to find graph of this type of solutions .

finalsol := exp(I*(-k*x+t*(k^2+2*rho^2-2*sigma^2)+theta))*rho*tanh(-2*k*rho*t+rho*x);

sol1 := eval(finalsol, [rho = .5, theta = .5, sigma = .5, k = .5]);

graph1 := plot3d(sol1, t = -5 .. 5, x = -5 .. 5, numpoints = 300, frames = 50, axes = framed, color = x, thickness = 5, axesfont = ["HELVETICA", "ROMAN", 24], labelfont = ["HELVETICA", "ROMAN", 24]);

ContPlot1 := contourplot(sol1, t = -20 .. 20, x = -20 .. 20, frames = 50, axes = framed, thickness = 5, numpoints = 300, a*xesfont = ["HELVETICA", "ROMAN", 24], labelfont = ["HELVETICA", "ROMAN", 24])

plot_solution.mw

 

in maple 12,

i follow https://en.wikipedia.org/wiki/Eigenvalue_algorithm

it said QR return eigenvector but after compare with eigenvector function, they are not the result from eigenvector function

with(LinearAlgebra):
M := Matrix([[1,2,3],[4,5,6],[7,8,9]]);
A := HessenbergForm(M);
Q1, R1 := QRDecomposition(A);

Q1, R1 := QRDecomposition(M);

v, e := Eigenvectors(M);
v, e := evalf(Eigenvectors(M));
 

in maple 2015

if start from GivensRotationMatrix , how many times of 

GivensRotationMatrix in order to calculate the result of QR decomposition?

can this QR decomposition calculate the result of eigenvector?

First 812 813 814 815 816 817 818 Last Page 814 of 2427