Kitonum

21860 Reputation

26 Badges

17 years, 239 days

MaplePrimes Activity


These are replies submitted by Kitonum

@nm   Since  diff  command works with lists (as element-wise function), the same thing can be written shorter:

restart;
y:=[exp(2*x), exp(-x), x*exp(-x), x^2*exp(-x)]:
Matrix([seq(diff(y, [x$i]), i=0..nops(y)-1)]);
LinearAlgebra:-Determinant(%);

 

 

 

 

@st104290   If Maple can not find an explicit formula as in your example, then you can use tomleslie's method. It will work for a wider class of recurrence equations.

@leafgreen  In the syntax for a histogram, the frequencies are used instead of probabilities.  [2, 4$4, 6$5]  means  [2, 4, 4, 4, 4, 6, 6, 6, 6, 6]

@leafgreen 

Statistics:-Histogram([2, 4$4, 6$5], discrete = true, thickness = 25, tickmarks = [[2 = `ℏ`, 4 = `0`*`ℏ`, 6 = 2*`ℏ`], [0.1, 0.4, 0.5]], view = [0 .. 7, 0 .. 0.55], axes = normal, axesfont = [times, roman, 14], color = cyan, title = "Problem 7(b)");
 

@Derein  Just plot these data:

plot([seq([k, x[k]], k=1..30)]);
 

@Markiyan Hirnyk  In your document  double_points.mw

in the line  
for b in {seq(0..3*n)} do

should be  6  instead of  3

@Markiyan Hirnyk   I prefer to use eval than parameters option because it's just shorter for typing.

@mayazteca5  See the appendix to my answer below. You can also do this with other plotting methods using  plots:-display  command.

@vv  

J(5, 1);
   Error, (in J) invalid input: J expects its 1st argument, n, to be of type posint, but received 0


 

 

In fact, your link contains a solution that works perfectly. You do not have to add "1" yet. Perhaps you are confused by the example (in the link) for  n=5  and  k=3 . But in this example, the numbering of people starts with 1, not with 0. I did not understand the logic of your code and why do you consider it to be improved.

Josephus:=proc(n,k)
if n = 1 then return 0 else
Josephus(n-1, k)+k mod n fi;
end proc:

 

Example of use:

Josephus(5, 3);

                                            3
 

@Markiyan Hirnyk   If you give a result that depends on the parameters, then the parameter values should be specified when this result is correct. Otherwise, what is the value of this result?

@Markiyan Hirnyk   Obviously, any generic answer must be true for particular cases. And more

restart;
S:=sum(k*sin(k*x)/(k^2+p^2+k), k = 1 .. infinity, parametric) assuming real:
evalf(eval(S, x=0));

             Error, (in Zeta) numeric exception: division by zero

 

@Markiyan Hirnyk 

S:=sum(k*sin(k*x)/(k^2+p^2+k), k = 1 .. infinity, parametric) assuming real:
evalf(eval(S,[p=0,x=1]));

              Error, (in LerchPhi) numeric exception: division by zero
 

@Matt C Anderson  NumberTheory package appeared only in Maple 2016. In Maple 17, you should use  numtheory  package. Here are the versions of these two procedures for Maple 17. For convenience, I also inserted the text of  Partition  procedure (combinat:-partition  package can not replace it). See the file below.

GWC.mw

@Markiyan Hirnyk   I just replaced  Pi/4  by  Pi/7 :

Student[Calculus1]:-Roots((10*cos((6*(1/10))*t)-10*cos((3/10)*t+(1/7)*Pi))^2+(10*sin((6*(1/10))*t)-10*sin((3/10)*t+(1/7)*Pi))^2 = 0, t = 0 .. 20*Pi);

                                                              [ ]

First 67 68 69 70 71 72 73 Last Page 69 of 134