Thomas Dean

322 Reputation

10 Badges

19 years, 115 days

MaplePrimes Activity


These are questions asked by Thomas Dean

How do I characterize this equation set? I think it has 6 solutions, equal in pairs, or 3 distinct solutions.

restart;

eq1 := x = (((72*5^(3/2)+270)*a^2-1344*5^(3/2)*a)*w+(9*5^(5/2)-1485)*a^2-2016*5^(3/2)*a-12544*5^(5/2))/(((288*sqrt(5)+216)*a^2-5376*sqrt(5)*a)*w+(36*5^(3/2)-1188)*a^2-8064*sqrt(5)*a+6272*5^(3/2)):

eq2:= a^3 = -(128*5^(5/2)*w)/9+(1600*w)/3+(544*5^(3/2))/9+15200/27:

eq3:=1+w+w*w = 0:##   or w = (sqrt(3)*%i)/2-1/2;

for s1 in [solve(eq2,a)] do
    for s2 in [solve(eq3,w)] do
        subs(a=s1, eq1):
        subs(w=s2,%):
        lprint("sol",simplify(%));
    end do;
end do;
 

Irrespective of what help says, both series and taylor return series(...) rather that big-O expression

From help:

> series(x/(1-x-x^2), x=0);
series(1*x+1*x^2+2*x^3+3*x^4+5*x^5+O(x^6),x,6)
> taylor(sin(x),x=Pi);
series(-1*(x-Pi)+1/6*(x-Pi)^3-1/120*(x-Pi)^5+O((x-Pi)^7),x=-(-Pi),7)
 

I am having problems setting up plots on a new computer.

plotsetup(x11);
interface(plotdevice);
x11
plot(sin(x));
Error, plot driver not found
plotsetup()
preplot = [], postplot = [], plotdevice = x11, plotoutput = terminal, plotoptions = ``

I am attempting to add the contents of a variable based on the contents of another. There should be some way to do this without looping. I get errors when trying to do this with seq. I seem to not understand evaluation...

How do I do this?

restart;
## generate some values like in the real app
roll:=rand(1..9):
N := sort([seq(seq(10*(2+jdx)+roll(),jdx=1..5),idx=1..10)]):
V := 10*seq(roll()+10*trunc(N[idx]/10),idx=1..nops(N)):

## generate index for sum. This groups the values for sum
sumidx := [seq(floor(N[idx]/10)-2,idx=1..nops(N))];

## create and zero sum variable
S := 0 *~convert(convert(trunc~(N/10),set),list);

## calc sum and display it - This works
for idx to nops(sumidx) do
    S[ sumidx[idx] ] += V[idx]:
end do:
S;

## error because sumidx[idx] is not evaluated ?????
S := 0 *~convert(convert(trunc~(N/10),set),list):
seq('S'[ sumidx[idx] ] += V[idx], idx=1..nops(N));
S;

## This works 'S' delays evaluation and sumidx[idx] is evaluated in
## the function call
f := proc( A, B )
    A += B:
end proc:
## zero sum variable
S := 0 *~convert(convert(trunc~(N/10),set),list):
seq(f('S'[ sumidx[idx] ], V[idx]),idx=1..nops(N)):
S;
 

I am trying to decide O of times fo a computer process. I thought it was n^2*log(N) or something like that.

With 12  points, it may be hard to determine if O(N^4), etc.

See big-o.mw

2 3 4 5 6 7 8 Last Page 4 of 15