MaplePrimes Questions

Is it just me that is being daft, or am I correct in ascerting that there does still not exist (even in Maple 17) a command for taking the commutator of two matrices?

As far as I can tell from the help pages, there exists only a commutator of vector fields (in the tensor package), and a commutator af algebraic quantities (in the Physics package).

Not having such a command for matrices is, of course, not critical, as it is very easily programmed, but I am just surprised, for something as fundamental as checking some representation of a Lie algebra, say, requires taking such commutators.

Helloo everyone,

eq1:=((diff(f(eta),eta$3)))-a*diff(f(eta),eta$1)^2+b*f(eta)*diff(f(eta),eta$2)=0;

bc:=f(0)=0,D(f)(0)=1+c*(D@@2)(f)(0),D(f)(8)=d:

Now the question is how we can get data in the following form 

a      b     c      d         dif(f(eta),eta$2) at eta=0

1      1     1      1                  0.1

1     2      1      1                   0.2

1     2      2       1                   0.3

1     2     2      2                      0.4

2      1     1      1                  0.5

2     2      1      1                   0.6

2     2      2       1                   0.7

2     2     2      2                      0.8

In the above table, I want to vary a, b, c, d and to find out the values from the ode for dif(f(eta),eta$2) at eta=0

Here is my try but no luck

 

sol:= (a1,b1,c1,d1)->dsolve({bc,eq1}), numeric,output = array([0]);

p:=proc(a1,b1,c1,d1)
subs(sol(a1,b1,c1,d1):-value()(a1,b1,c1,d1),Vector[row]([a1,b,c,d,rhs(sol[3])])) #dif(f(eta),eta$2) at eta=0 is called as rhs(sol[3])
end proc;

ha:=.01: hb:=.1: hc:=0.1: hd:=0.1: #Increments in a, b, c and d, respectively
Ia:=2: Ib:=2: Ic:=2: Id:=2: #Number of increments
A:=Matrix(ha*hb*hc*hd,5); #Rows: [a,b,c,d,dif(f(eta),eta$2) at eta=0]

r:=0:

for i from 1 to Ia do
q:=sol(i*ha);
for j from 1 to Ib do
v:=q:-value(b=j*hb);

for l from 1 to Ic do

w:=v:-value(c=j*hc);
for k from 1 to Id do
r:=r+1;
A[r,..]:=subs(v(hd*k),subs(w(hc*l),Vector[row]([i*ha,b,c,d,rhs(sol[8])])))
end do

end do

end do
end do;
time()-t0;

interface(rtablesize=infinity);

 

A;

 

Thanks

Hello, I have a term that do not have the variable 'n' in it, but why is the calculated number different? For example, why is

QQ:=Matrix([[3],[4],[1]]);

for m from 1 to 2 do
for n from 1 to 2 do
QQ:=(QQ*m)+QQ;
end do:
end do:

Answer: QQ:=Matrix([[108],[144],[36]])

 

different from

 

QQ:=Matrix([[3],[4],[1]]);

for m from 1 to 2 do
QQ:=(QQ*m)+QQ;
end do:

Answer: QQ:=Matrix([[18],[24],[6]])

Hi MaplePrimers,

I'm trying to solve a system of algebraic equations using 'solve' [float].  I'd prefer to use 'solve' over 'fsolve', as 'solve' solves my system in about 0.05s, whereas fsolve takes about 5 seconds.  I need to solve the system repeatedly at a different points, so time is important.  I don't know why there is such a large difference in time ... 

I have a few piecewise functions of order 3 to 5.  It solves fine with the other (piecewise) equations, but adding one piecewise function which gives me an error while trying to solve:

Error, (in RootOf) _Z occurs but is not the dependent variable.

I think this is due to solve finding multiple solutions.  Is there a way to limit solve to only real solutions?

Thanks in advance!

Hi, i am trying to export the following bifurcation diagram into a pdf.

 

Digits:=20: N:=10000: M:=100: x_max:=1: r_min:=0:
r_max:=4: for n from 0 to N do r:=r_min+n/N*(r_max-r_min):
x:=evalf(x_max*rand()/10^12):for m from 0 to M do x:=x*exp(r*(1 - x)): od:
X[n]:=x: od:
with(plots):
bifpoint:={seq([r_min+j/N*(r_max-r_min),X[j]],j=0..N)}:
pitchf:=pointplot(bifpoint,symbol=point):display(pitchf);

 

For some reason the graph is just blank, with just the axis when i export to pdf.

How to set feasibility tolerance for optimization command?

Any example to show some syntax.

my_sol.mw

Leonhard is playing a casino game. He places his bet and then rolls a
pair of dice: if the dice sum to 7, 8 or 9 then Leonhard wins the amount of his
bet, and otherwise Leonhard loses his money. Leonhard begins with $100 and
decides to bet $50 at time, until he has either won $100 or has gone broke. What
are the chances that Leonhard leaves the casino a winner?

My soln doesn't agree with the stated answer..25/74

Has anyone else seen the following behavior in Maple 16 and/or 17? In worksheet mode, with 2-D math notation, after hitting <enter> to execute a line several times, the software switches, without warning and unrepeatably, to a mode where only the arrows work -and that is to scroll the sheet. This means the <enter> command is no longer recognized.

My only solution has been to click on the line with the mouse, for which it returns to input mode. This behavior started in version 16 and I switched back to 15. However, I prefer features of 17 such as the different subscript options, that I would like to stay in 17.

I note this behavior occurs on both my Windows based machines and have seen it on students' Mac based machines. We use a common site licence at our institution and I wonder if that might be the problem.

In short - it is a pain.

(Yes, I did try to look for other posters with a similar problem, but failed. )

"Error, (in CheapestPaths) too many levels of recursion"

I received this message after trying to execute Zeilberg's GetMicrosoftJob program found here: http://www.math.rutgers.edu/~zeilberg/tokhniot/GetMicrosoftJob but don't know the cause. Any ideas?


I have following expression:

y1:=t->1/(4*cosh(t)^2)

I:=int(y1(t)^2,t=-T/2..T/2)

Now I tried:

MultiSeries:-asympt(I,T,5)

for which I only get the highest order.

Can I increase the order in any way?

What is wrong???

restart;
with(DEtools); with(plots);
epsilon := 'epsilon';

epsilon := 0.3e-1;
h := .75;
p := 2;
q := 0.6e-2;

sol := dsolve([[epsilon*(diff(x(t), t)) = x(t)+y(t)-q*x(t)^2-x(t)*y(t), diff(y(t), t) = h*z(t)-y(t)-x(t)*y(t), p*(diff(z(t), t)) = x(t)-z(t)], [x(0) = 100, y(0) = 1, z(0) = 10]], type = numeric);
%;
Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

Hello, please i would like someone to please explain Hermite Polynomial for me. I have zero knowledge of this and if possible give examples and references. Also, on how to Normalize Hermite Polynomial and Ortogonarity of Hermite Polynomial. Thanks

Hello, I have quite a complex thing to solve, but would simplify it here. I would like to solve the unknown in a matrix, how can I use the 'solve' function? For example

A:=Matrix(3,1,4)
B:=Matrix(3,1,[2,7,9])
The relation between them is A=B*y

How can I use the below function?
solve(A=B*y,y)

 

Dear people in this board.

I couldn't solve the following equation.

restart;

solve(gamma*(sigma/(sigma-1))=1,gamma);

On the other hand, I could solve

solve(alpha*(sigma/(sigma-1))=1,alpha);

Error message was 

Error, (in solve) a constant is invalid as a variable, gamma

Why does this sort of things happen?

I hope that you will tell me about this.

Tahnk you in advance.

 

taro 

 

 

 

I have a programme which examine how well a particular set of data fits a theoretical function.

In fact, I faced a problem : the programme returns only one solution and I guess in an arbitrary way.

I would like to find a way to define an interval in which the programme seeks solutions .

How can I do so?

 

with (Optimization)
[ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize, NLPSolve,QPSolve];


data := [[2.954488^2, 1.644900e-5], [3.132092^2,1.614900e-5], [3.307416^2, 1.594200e-5], [3.471311^2, 1.550700e-5], [3.559775^2, 1.450200e-5], [3.669332^2, 1.499400e-5], [3.825572^2, 1.476900e-5], [3.962449^2, 4.133000e-8], [4.200714^2, 1.320900e-5],
[4.434636^2, 1.433400e-5], [4.638319^2, 1.259100e-5], [4.832908^2, 1.258500e-5], [5.078484^2,
1.216200e-5], [5.315167^2, 1.164300e-5], [5.662155^2, 1.131000e-5], [5.916080^2, 1.082400e-5],
[6.208865^2, 1.054800e-5], [6.526868^2, 1.002600e-5], [6.880407^2, 1.006200e-5], [7.243618^2, 9.594000e-6], [7.607233^2,
9.288000e-6], [7.916439^2, 8.958000e-6], [8.320457^2, 8.664000e-6], [8.721812^2, 8.439000e-6], [9.007774^2, 8.325000e-6], [8.721812^2, 8.439000e-6], [9.007774^2,8.325000e-6], [9.393083^2, 7.878000e-6], [9.668506^2, 7.755000e-6], [9.988994^2,7.623000e-6], [10.40192^2, 7.367000e-6], [10.94532^2, 6.928000e-6], [11.38244^2,6.812000e-6], [11.85200^2, 6.720000e-6], [12.18811^2, 6.422000e-6], [12.67281^2, 6.403000e-6], [12.96341^2,6.514000e-6], [13.49185^2, 6.032000e-6], [13.76590^2, 6.103000e-6], [14.4072^2,6.143000e-6], [14.45476^2, 6.095000e-6], [14.76313^2, 5.758000e-6], [15.09868^2,6.965000e-6]]:

f:= x -> abs(((2*(c*exp(-b*1.5e-6)/(2*150*(c^2-((1+I)*(sqrt(3.14*x/8.5e-5)))^2)))*(2*(((1-I)*c/(2*(sqrt(3.14*x/8.5e-5))))-((0.026/150)*sqrt(8.5e-5/2e-5)))*exp(-c*0.5e-3)+((1+((0.026/150)*sqrt(8.5e-5/2e-5)))*(1-((1-I)*c/(2*(sqrt(3.14*x/8.5e-5)))))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3))-((1-((0.026/150)*sqrt(8.5e-5/2e-5)))*(1+((1-I)*c/(2*(sqrt(3.14*x/8.5e-5)))))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3)))+(b/(2*a*(b^2-((1+I)*(sqrt(3.14*x/9e-6)))^2)*((2*(1-((0.026/150)*sqrt(8.5e-5/2e-5)))*(1+((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150)))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3-b*1.5e-6))-(2*(1+((0.026/150)*sqrt(8.5e-5/2e-5)))*(1-((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150)))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3-b*1.5e-6))-((1-((0.026/150)*sqrt(8.5e-5/2e-5)))*(1-((a/150)*sqrt(8.5e-5/9e-6)))*(1-((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3+((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))-((1-((0.026/150)*sqrt(8.5e-5/2e-5)))*(1+((a/150)*sqrt(8.5e-5/9e-6)))*(1+((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3-((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))+((1+((0.026/150)*sqrt(8.5e-5/2e-5)))*(1+((a/150)*sqrt(8.5e-5/9e-6)))*(1-((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3+((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))+((1+((0.026/150)*sqrt(8.5e-5/2e-5)))*(1-((a/150)*sqrt(8.5e-5/9e-6)))*(1+((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3-((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))))/(((1-((0.026/150)*sqrt(8.5e-5/2e-5)))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3))*(((1-((a/150)*sqrt(8.5e-5/9e-6)))*(1+((0.026/150)*sqrt(8.5e-5/2e-5))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))+((1+((a/150)*sqrt(8.5e-5/9e-6)))*(1-((0.026/150)*sqrt(8.5e-5/2e-5))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(-((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6)))-((1+((0.026/150)*sqrt(8.5e-5/2e-5)))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3))*(((1+((a/150)*sqrt(8.5e-5/9e-6)))*(1+((0.026/150)*sqrt(8.5e-5/2e-5))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))+((1-((a/150)*sqrt(8.5e-5/9e-6)))*(1-((0.026/150)*sqrt(8.5e-5/2e-5))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(-((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6)))))))*((1+I)*(sqrt(3.14*x/2e-5)))*exp(-190e-6*((1+I)*(sqrt(3.14*x/2e-5))))):


residuals := map(p -> (f(p[1])-p[2]), data):
R:= LSSolve(residuals);

 

First 1492 1493 1494 1495 1496 1497 1498 Last Page 1494 of 2433