Joe Riel

9660 Reputation

23 Badges

20 years, 3 days

MaplePrimes Activity


These are answers submitted by Joe Riel

y := sqrt(x^2+1);
applyop(sort,1,y,order=plex(x),ascending);
Actually, you don't need the applyop, sort seems to work here without it
sort(y, order=plex(x), ascending);
sort(y, order=plex(x), descending);

Type diff then press escape, which pops up an appropriate dialog.

I suspect that you'll find that the solution is not unique unless another initial condition is specified. Here's one way to handle that

sys := {Q(0) = 0, Q(t) = (1.375*4190)*(80-T__1(t)), Q(t) = (1.375*4190)*(T__2(t)-38.2), diff(Q(t), t) = (0.1375e-1*(T__1(t)-T__1s(t)))*((T__1(t)+T__1s(t))*(1/2)), diff(Q(t), t) = (0.1375e-1*(T__2s(t)-T__2(t)))*((T__2s(t)+T__2(t))*(1/2)), diff(Q(t), t) = (240*0.1375e-1)*(T__1s(t)-T__2s(t))/(0.1e-2)}:
inieqs := subs(t=0,convert(sys,D)):
inisol := frontend(fsolve, [inieqs,{Q,T__1,T__2,D(Q),T__1s,T__2s}(0)], [{`+`,`*`,`=`,set},{}]):
ini := select(has,inisol, T__1s);
f := dsolve(sys union ini, numeric):
f(1);
  [t = 1., Q(t) = 16.9804473424030, T__1(t) = 79.9970526452866, T__1s(t) = 62.6882711631579, T__2(t) = 38.2029473547134, T__2s(t) = 62.6831259358860]
 
radnormal(sqrt(3579757));
               151*157^(1/2)

As Acer suggests, the first thing to do is to make the single-threaded approach as efficient as you can.  One improvement, probably minor here, is to avoid  building a list an element at a time. 

with(Threads);
with(plots);

HeatP := proc (f, g, n, lambda, X, N, M, T)
global x;
local i,k,t,val;
    val := add((int(sin(k*lambda*x)*g, x = 0 .. 1))*exp(-k*lambda*t)*sin(k*lambda*x), k = 1 .. n);
    [seq(plot(eval(val,t=(i*T-T)/M), x = 0 .. 1), i=X..N)];
end proc;

g := piecewise(x <= 0, 0, 0 < x and x < 1, exp(-2/(1-(x-1/2)^2)), x >= 0, 0);

plts := HeatP(0, g, 5, Pi, 1, 3, 8, 2);

display(plts);

Note that the f parameter is never used.

I suspect that a proof is not what you are looking for in that the statement is practically a definition of Pi.

With that in mind, see the first example in the help page for VectorCalculus,ArcLength.

Was Maple's current directory the same as the directory in which the file was located? The current directory is displayed in the bar at the bottom of the GUI.  Click on it to change the directory.

verify is the wrong procedure to use here, it is for doing type-based verifications. Use is

is(2*q/(q^4+q^2+1)-1/((q-1)^2*(q+1)) >= 0) assuming q>7;
                       true

You need to add C:\emacs\bin\.emacs.d\maple to the load-path variable for Emacs.  I do this, in my .emacs file, with

(add-to-list 'load-path (concat user-emacs-directory "maple"))

That assumes the emacs-defined variable user-emacs-directory points to C:\emacs\bin\.emacs.d\. To determine that, execute the command describe-variable and enter user-emacs-directory. 

Because aa is an equation rather than an expression, I'll assume you just want to collect the rhs and leave the lhs alone.  The following works

lhs(aa) = frontend(collect, [rhs(aa), omega^(-sigma+1)]);   

The command Matrix(15) returns a 15 x 15 Matrix.  An initializer can be passed to the Matrix procedure to assign the initial values, see the ?Matrix help page.

f := sqrt(x^2+x+1)-sqrt(x^2-x+1):
(minimize..maximize)(f,x);
                             -1 .. 1

A clever but not the most efficient way to do this

A := add(``(x), x=op~([g[]])):
cnt := i -> coeff(A,``(i)):

The following should be more efficient, assuming you want to access all the counts eventually

L := op~([g[]]);
cnt := table('sparse'):
for x in L do cnt[x] := cnt[x]+1; end do:
# Now access cnt by
cnt[i];

The index variable j goes to 3, the for loop references K[j], but K only has two elements.

You could use one of the filters in Signal Blocks > Continuous.  Alternatively, you could build your own from the various blocks.  Feedback works fine; what did you try?

First 21 22 23 24 25 26 27 Last Page 23 of 114