vv

12453 Reputation

19 Badges

9 years, 285 days

MaplePrimes Activity


These are answers submitted by vv

with(Statistics):
m:=Mean(a):
v:=Variance(a):
b:=v/m: c:=m/b:
P:=DensityPlot(RandomVariable(Gamma(b,c))):
plots[display](h,P);

 

 

You may clip the plots manually instead of using view.
For example,

g:=sin(k*x):
g1:=piecewise(g<1/2, g, undefined):
plots:-animate(plot, [g1, x=0..4, view=[-6..6,-2..2]], k=1 .. 6.0);

 

You cannot expect acceptable results for this model: your function takes values < 1 (for any parameters) while your y-vector has almost all values > 20.

In Windows you could write a short Autoit script to "export as .mpl" (see https://www.autoitscript.com) and insert a ssystem call  in the worksheet which executes the script.

fdiff at x needs the values of the function at x + h and x - h etc and temperature is not defined for x>1.
You can use e.g.:

evalf((D[1](temperature))(0.99999, .5));
or

h:=10^(-5);
(-temperature(1-h, .5) + temperature(1, .5))/h;

 

restart;
a:={theta <= Pi-arccos(-3/4+(1/4)*sqrt(13+16*sqrt(2))), arccos(3/4) < theta};
assume (op(a));
getassumptions(theta);  op([1,2],%);
theta:='theta'; # forget properties

Another workaround is to use 1D input.
[Because in 2D,
  d:=(1..3)$n 
also fails, and for n=1000 there is no other option].

P.S. I wonder if the following theorem is true:
For any 2D parser P, there exists a correct 1D expression for which P fails.

Now the dictionary appears as "Definition".

Looking for ?Definition  the first definitions appear in the search list, but not all, probably because the length of the list is limited.
But searching e.g. ?Definition,taylor,  the  definitions related to taylor appear.
In my opinion, the organization and the seach system used to be better in earlier versions.

 

 

I think that a good idea is use tables with multiple indices.
E.g. instead of
A :=  table([x=table([u=1]), y=table([v=table([p=2]), w=3])]);
use:

A[_root]:=[x,y];
A[x]:=[u];
A[x,u]:=1;
A[y]:=[v,w];
A[y,v]:=[p];
A[y,v,p]:=2;
A[y,w]:=3;

So, the leaves will be:

select( t -> not(type(t,list)), [entries(A,nolist)]);
And the corresponding path is in
indices(A);

 

Your equation is:

tan(Pi*t) = tan(2*Pi*t^2);
Hence, the solutions  are

1/4+(1/4)*sqrt(1 - 8*_Z), 1/4-(1/4)*sqrt(1 - 8*_Z);

(_Z integer; <=0 for real solutions).

 

The best way would be to save the generated procedures.

restart;
n := 40: h := 40:
a := h*i/(2*n):

sys1 := [diff(x(t), t) = 2*t+1, diff(y(t), t) = 1+5*t, x(0) = 1, y(1) = 0]:
for i from 0 by .5 to 1 do res[i] := dsolve(sys1, numeric) end do:
save res, "d:/mymaplefiles/odes.txt":
# ...
restart;
read "d:/mymaplefiles/odes.txt":
res[0](1/2);

 

Actually in 1D math one may use any number n of dots (n>1) instead of n=2.
So,  seq(2..........7)  is OK.
The situation in 2D math is the same, unless there is no space after the last dot . So, seq(2.......  7) is OK. Without spaces, the number of dots must be even (otherwise the last dot is considered as a decimal point). It is interesting.
 

You are missing a multiplication sign in z[k+1]  after (1 + 1/beta).

2D input math in action again!

Generate each plot in a different color.
For example,

col := k -> COLOR(HUE, k/(2*nops(n)+1)):

#  inside the loop:
# for ...
fplt[j] := plots[odeplot](sol1, [eta, diff(diff(f(eta), eta), eta)], axes = boxed, color=col(j));
tplt[j] := plots[odeplot](sol1, [[eta, theta(eta)]], axes = boxed, color=col(j+n))

# ...end do;

 

 

In Windows insert in your code something like

system("C:/Program Files/Windows Media Player/wmplayer.exe  d:/yourdir/yourmelody.mp3");

First 91 92 93 94 95 96 97 Last Page 93 of 111