Carl Love

Carl Love

28095 Reputation

25 Badges

13 years, 100 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

teksbiasa:= `Hello! Bob`:
ListTools:-Flatten(
     ListTools:-Pad[1](
          (w-> w+~nops(w))~(convert~(StringTools:-Split(teksbiasa, ` `), bytes)),
          32
     )[..-2]
);

The following plots the first 5122 zeros (the plot in the paper shows 10,000) in about 18 minutes. To get more zeros, expand the imaginary range, which I set at -9999..9999. The zeros are rather evenly distributed throughout the imaginary range.

R:= [RootFinding:-Analytic(add(1/n^s, n= 1..5), s, re= -3..1, im= -9999..9999)]:
nops(R);

     5122

To normalize the roots modulo 2*Pi*I/ln(5), as is done in the paper, use frem.

M:= evalf(2*Pi/ln(5)):  
Frem:= proc(x,y) local r:= frem(x,y); `if`(r<0, r+y, r) end proc:

One way to plot complex points (the easiest way as far as I'm concerned) is to separate them into real and imaginary parts with Re and Im.

P:= map(z-> [Re(z), Frem(Im(z),M)], R):
plot(P, style= point, symbol= point, symbolsize= 1);

Sure, it's easy:

sumif:= (L::{list,set}, B)-> `+`(select(B, L, _rest)[]):

Now let's say that I have a list:

R:= rand(9):  L:= ['R()' $ 9];

And I want to sum all those elements that are greater than 5:

sumif(L, `>`, 5);

 30

 

Another way: If L is the list of digits, do

(parse@cat@op)(L);

ListTools:-Reverse(convert(mylist, base, 10));

The reverse of [2,7,5] is [5,7,2]. You have it as [5,7,5].

Why is 3 any different than the 11 that I showed you how to add to every term last week?

nilaiASCII +~ kekuncirahsia;

What you want can be done with a single simplify with side relations command. First you need to freeze the expressions e^epsilon and e^(-epsilon) so that every expression in the matrix is polynomial. (Note that these aren't the same as exp(epsilon) and exp(-epsilon); however, I've continued with your erroneous usage.) The expression that you have labeled (3) I call ex. Then all that you need to do is

M1:= subs(e^epsilon= freeze(e^epsilon), e^(-epsilon)= freeze(e^(-epsilon)), M):
thaw(simplify(ex, {seq(seq(T[i]*U[j]= M1[i,j], i= 1..op([1,1], M)), j= 1..op([1,2], M))}));

Since theta(t) only appears in derivatives, it is easy to reduce the order. Change diff(theta(t), t) to dtheta(t) and diff(theta(t), t, t) to diff(dtheta(t), t):

eq1:=J*diff(dtheta(t),t)+b*dtheta(t)=K*i(t):
eq2:=L*diff(i(t),t)+R*i(t)=V(t)-K*dtheta(t):
DCMotor:=[eq1,eq2];
Sys:=DiffEquation(DCMotor,[V(t)],[dtheta(t)]);

The following command will take care of the asymptotes automatically:

Student:-Precalculus:-RationalFunctionPlot((x-1)/(x-2));

alpha__0:= x-> sqrt(d/x)/2*exp((-D__s - i)*Omega*x/V__La):
alpha__90:= x-> 3*sqrt(d/32/x)*exp((-D__s - i)*Omega*x/V__s):
alpha__theta:= (x,theta)-> alpha__0(x)*cos(theta)^2 + alpha__90(x)*sin(theta)^2:

If you intend for the i to refer to the complex unit sqrt(-1), then you'll need to change it to I.

MyArray:= (n,N)-> Array((1..N)$n, ()-> [args]);

A:= MyArray(3,3);

nilaiASCII +~ nops(nilaiASCII);

Here's how I like to solve recurrences by hand with the assistance of Maple. I start with a(n) and work backwards (towards a(0) or a(1)) with a "stunted" (i.e., partially inert) recursive procedure.

a:= n-> ''a''(n-1)/n:

Note that those quotes are two pairs of single quotes, not one pair of double quotes.

eval(a(n));

eval(%);

eval(%);

At this point, I see the pattern: a(n) = a(0)/n!

 

It may be most efficient to do it from the original integer representation. I haven't checked its speed, but here's a procedure to do it that way:

nOneBits:= proc(n::nonnegint)
local q:= n, ct:= 0;
     while q <> 0 do ct:= ct+irem(q,2,'q') end do;
     ct
end proc:
     
nOneBits(255);

     8

First 233 234 235 236 237 238 239 Last Page 235 of 395