## Display Expression...

I have a expression p:=C*A+A, when i type this to maple, maple display into p:=A*C+A because commutative property of multiplication

but I dont want to do like that. How can I display into p:=C*A+A?

## Maple symbolic toolbox for matlab...

I have an important question regarding the symbolic toolbox from maple for matlab

I have declared three symbolic variables:

syms t;

x = sym('x(t)', 'real');

y = sym('y(t)', 'real');

z = sym('z(t)', 'real');

f = x + y + z;

Now i want to  calculate the derivation of f regarding the variable t:

df = diff (f, t);

The result should be

df = dx(t) / dt + dy(t) / dt + dz(t) / dt

but  instead i get the result df = 0. If i use the command diff (f) i get the result

df = dx(t) / dt

Does anyone know how to fix this problem?

## Mean - Real Measurements unsorted...

Hi Guys,

got my last Problem solved :) Now i do have a new one...

```restart; with(RealDomain); with(CodeGeneration); with(ExcelTools); with(plots);
dx1:=133;
dy1:=132;

n := 1;
for i to 256 do
for j to 256 do
r := evalf(sqrt((i-dx1)^2+(j-dy1)^2));
Ints := R0[i, j];
IntsR[n] := [r, Ints];
n := n+1
end do;
end do;
IntsR := [seq(IntsR[i], i = 1 .. n-1)]```

The list IntsR consists of unsorted values doublets. Now it would be nice to get some sort of mean value of my Ints over r.  Didnt really find a solution for it until now... do you have any hint?

## Error, unable to parse ('local' command)...

Hi, i'm working with some spectral acceleration data and i'm having troubles with a 'local' command on a Newmark method code i found on the internet. I'm not a maple expert so i wish someone could help me. i'm ussing maple 2015. Greetings

Newmark=proc(z0,u0,F0);  local beta,  dt, c, kg,a,b, N, i, dF, dz, du, dw, T, m, k ;        dt:=0.01;    T:=4;    N:=T/(dt);    gam:=0.5;    beta:=0.25;      m:=0.320;    k:=435;    c:=2;   z(0):=z0;   u(0):=u0;   F(0):=F0;   w(0):=(1/(m))*(F0-k*z0-c*u0);        t=vector(i,1);    t[1,1]=0;      for i from 2 to N do :  t(i,1)=t(i-1,1)+dt:  end do:           kg:=k+(gam*c)/(beta*dt)+m/(beta*dt*dt);    a:=m/(beta*dt)+(gam*c)/(beta);    b:=  (0.5*m)/(beta)+dt*((0.5*gam)/(beta)-1)*c;       for i from 2 to N do  dF(i):=diff(F,t)+a*u(i)+b*w(i);    dz(i):=(dF(i))/(kg);    du(i):=((gam*dz(i))/(beta*dt))-((gam*u(i-1))/(beta))+dt*(1-gam/(2*beta))*w(i-1);    dw(i):=((du(i))/(beta*dt*dt))-((u(i-1))/(beta*dt))-((w(i-1))/(2*beta));     z(i+1)=dz(i)+z(i);    u(i+1):=du(i)+u(i);    w(i+1):=dw(i)+w(i);     od;       plot([z(i), u(i), w(i)],x=0..50,y=-50..50);       end;

## How to use substition with functions?...

Consider substutition with use of a function:

`subs(F(x,y)=f(x)+g(y), F(x,y));`

As expected, Maple returns the proper answer:

f(x)+g(y)

But

`subs(F(x,y)=f(x)+g(y), F(x,x));`

returns

F(x,x)

How to force Maple recognize F as a function, in order to obtain

f(x)+g(x)

in return?

The functions algsubs, applyrule work in the same way.

## Convert series to function...

Good day everyone,

I'm trying to convert a series solution back to its original function but its given me "Error, (in rsolve/linindex) invalid subscript selector".

Attached is the series below

theta := convert(a-(1/2)*beta*a^2*y^2+(1/12)*beta^2*a^3*y^4-(1/72)*beta^3*a^4*y^6+(1/504)*beta^4*a^5*y^8-(5/18144)*beta^5*a^6*y^10+(1/27216)*beta^6*a^7*y^12-(95/19813248)*beta^7*a^8*y^14+O(y^16), polynom);
1       2  2   1      2  3  4   1      3  4  6
a - - beta a  y  + -- beta  a  y  - -- beta  a  y
2              12               72

1      4  5  8     5       5  6  10     1       6  7  12
+ --- beta  a  y  - ----- beta  a  y   + ----- beta  a  y
504               18144                27216

95        7  8  14
- -------- beta  a  y
19813248
L := [seq(coeff(theta, y, n), n = 0 .. 14)];
[        1       2     1      2  3       1      3  4
[a, 0, - - beta a , 0, -- beta  a , 0, - -- beta  a , 0,
[        2             12                72

1      4  5         5       5  6       1       6  7
--- beta  a , 0, - ----- beta  a , 0, ----- beta  a , 0,
504                18144              27216

95        7  8]
- -------- beta  a ]
19813248         ]
with(gfun);
rec := listtorec(L, u(n));
[ //      2     2  3         2     2  2          2     2  \
[{ \2151 a  beta  n  - 1434 a  beta  n  - 30592 a  beta  n/ u(n) +
[ \

/             3                  2
\2476 a beta n  - 137904 a beta n  + 207248 a beta n

\
+ 424320 a beta/ u(n + 2)

/         3           2                      \
+ \-153660 n  - 322920 n  + 1803360 n + 2545920/ u(n + 4),

1       2          \      ]
u(0) = a, u(1) = 0, u(2) = - - beta a , u(3) = 0 }, ogf]
2                  /      ]

rsolve(rec[1], u);
/ //      2     2  3         2     2  2          2     2  \
rsolve|{ \2151 a  beta  n  - 1434 a  beta  n  - 30592 a  beta  n/
\ \

/             3                  2
u(n) + \2476 a beta n  - 137904 a beta n  + 207248 a beta n

\
+ 424320 a beta/ u(n + 2)

/         3           2                      \
+ \-153660 n  - 322920 n  + 1803360 n + 2545920/ u(n + 4),

1       2          \    \
u(0) = a, u(1) = 0, u(2) = - - beta a , u(3) = 0 }, u|
2                  /    /
sum(%*y^n, n = 0 .. infinity);
Error, (in rsolve/linindex) invalid subscript selector

thanx

## How to disable subsection in running?...

My subsection have so many lines of codes, sometimes I want to disable one subsection, is there simple way to disable one subsection? it is tedious to set # at each lines of the subsection.

Is there any way to say maple dont open specified subsection during the running?

## How can I get an Exact solution for system of ODE ...

I have a system of ODE that I need to get an exact solution to. How can I do this using Maple? I tried doing it but error pops out.

Thanks

## deleted question?...

I saw a question earlier today regarding 3 particles in a gravitational field.  It has since disappeared.

I see no rhyme or reason why it was deleted by someone, whoever did.  It was Math related and it was Maple related hence no reason for it's deletion.  This happened just before Mapleprimes and Maplesoft went offline for a couple of hours.

Can someone explain?  Did anyone else see it?

## Computational physics with DE equations ...

I need help with these two questions. anything is helpful

## How to extract data from implicit function with a ...

I plotted number of functions y=y(x) with different parameter aa for given value of tau (see the code below)

``````restart;
R0:=gamma+2*ln(2)+Re(Psi(1/2+(1+I)*tanh((1+I)*x)/((tau+0.25e-1*a)*y)))+ln(y);
tau := 9.975;
with(plots);
implicitplot({seq(R0, a = 1 .. 50)}, x = 0 .. 5, y = 0 .. 1, numpoints = 1000);
``````

## How to hide the commands in a quiz created with Ma...

Hi, I try to create quizes in Maple 2016, but I don't know how to hide the Maple commands. Is it possible?

I'd like my students to see only

when they access the quiz. Any help will be highly appreciated. Thank you.

## Plot points in a plot component...

I can not understand why the following statement works perfectly:
with (plots);
P1: = plot (f (x), x = xmin .. xmax, y = ymin .. ymax, color = "green");
P2: = plot (orddir, x = xmin .. xmax, y = ymin .. ymax, color = "blue");

Plots [display] (plottools [line] ([ascf, ymin], [ascf, 10]), color = red;
Plot ([5, y, y = 0 .. 10]);
P3: = implicit plot (x = ascf, x = xmin .. xmax, y = ymin .. ymax, color = red, linestyle = 3, thickness = 2);
P4: = plot (points, x = xmin .. xmax, y = ymin .. ymax, style = point, symbol = circle, symbolsize = 20, color = "black");
P5: = plot (h, x = xmin .. xmax, y = ymin .. ymax, color = "yellow");
Display ({p1, p2, p3, p4, p5}, axes = normal, scaling = unconstrained, title = "Parallel, vertice, focus, direction and axis of symmetry", gridlines = true);

While in the following
Points: = [F, V, A, B];
with (plots):
P1: = plot (f (x), x = xmin .. xmax, y = ymin .. ymax, color = "green");
P2: = plot (yd, x = xmin .. xmax, y = ymin .. ymax, color = "blue");
P3: = implicitplot (x = xv, x = xmin .. xmax, y = ymin .. ymax, color = red, linestyle = 3, thickness = 2);
P4: = plot (points, x = xmin .. xmax, y = ymin .. ymax, style = point, symbol = circle, symbolsize = 20, color = "black");

Do (% Plot0 = display ({p1, p2, p3, p4}, axes = normal, scaling = unconstrained, title = "Parallel, vertices, focus, direction and axis of symmetry", gridlines = true));

P4 does not print anything. In thanking you for the kind attention, I cordially greet you. Carmine Marotta ..

## TravelingSalesman - speed...

How is it possible that  GraphTheory:-TravelingSalesman
is much slower than a simple brute-force solution?

 > restart;
 > n:=10:
 > A:=Matrix(n, (i,j)->`if`(i=j,0,n*(n-i)^4+2*j+(n-i)^2+j^3)):A[1,2]:=100*n^3:A;
 (1)
 > with(GraphTheory):
 > G:=Graph(A);
 (2)
 > t:=time[real](): TravelingSalesman(G); 'time'=time[real]()-t;
 (3)
 > ############### brute-force #############
 > t:=time[real](): P:=Iterator:-Permute([seq(2..n)]): cmin:=infinity: ord:=<"none">: for  v in P do   f:=add(A[v[k],v[k+1]],k=1..n-2) + A[1,v[1]]+A[v[n-1],1];   if f
 (4)
 > # And for n=11 I had to interrupt TravelingSalesman; # brute-force still works for n=12.

## how to find unused local variables in a proc?...

Sometimes when one write a proc(), and later make changes, some of the earlier local variables could no longer used after the new edits.

In a small proc, it is easy to spot visually which ones are no longer needed and to remove them. But for a large proc() with many local variables, it is harder.

Does maple have a tool  to help one find which are the unused local declarations are not used? For example

```foo:=proc(x)
local y,z:
x^2;
end proc;```

I'd like maple to tell me that `y` and `z` are unused when I asked it to. (may be by highlighting or warning)

Mathematica has such a tool (and more) in its workbench editor which is very useful. does one need an external tool in Maple to do this?

 First 633 634 635 636 637 638 639 Last Page 635 of 2085
﻿