MaplePrimes Questions

How to write a_{01} in Maple





a[01] makes a_1. It mates a[01] - a[1] =0. However, a[0] becomes a_0. What to do? I want to write in maple in such that LaTeX conversion works good.

I'm using a procedure but the out is not returned. Please why?




doCalc:= proc( xi )

                 # Import Packages
                 uses ArrayTools, Student:-Calculus1, LinearAlgebra,
                      ListTools, RootFinding, plots, ListTools:
                 local gamma__1:= .1093,
                       alpha__3:= -0.1104e-2,
                       k__1:= 6*10^(-12),
                       d:= 0.2e-3,
                       theta0:= 0.0001,
                       eta__1:= 0.240e-1,
                       alpha:= 1-alpha__3^2/(gamma__1*eta__1), 
                       c:= alpha__3*xi*alpha/(eta__1*(4*k__1*q^2/d^2-alpha__3*xi/eta__1)),
                       theta_init:= theta0*sin(Pi*z/d),
                       n:= 30,
                       g, f, b1, b2, qstar, OddAsymptotes, ModifiedOddAsym,
                       qstarTemporary, indexOfqstar2, qstar2, AreThereComplexRoots,
                       soln1, soln2, qcomplex1, qcomplex2, gg, qq, m, pp, j, i,
                       AllAsymptotes, w, Efun, b, aa, F, A, B, Ainv, r, theta_sol, v, Vfun, v_sol,minp,nstar,
                       soln3, soln4, Imagroot1, Imagroot2;

# Assign g for q and plot g, Set q as a complex and Compute the Special Asymptotes

                       qq := [2.106333379+.6286420119*I, 2.106333379-.6286420119*I, 4.654463885, 7.843624703, 10.99193295,14.13546782, 17.27782732, 20.41978346, 23.56157073, 26.70327712, 29.84494078, 32.98658013,         36.12820481, 39.26982019, 42.41142944, 45.55303453, 48.69463669, 51.83623675, 54.97783528,                     58.11943264, 61.26102914, 64.40262495, 67.54422024, 70.68581510, 73.82740963,                                 76.96900389, 80.11059792, 83.25219177, 86.39378546, 89.53537903, 92.67697249];
                        m:= numelems(qq):

                        for i from 1 to m do 
                        w[i] := gamma__1*alpha/(4*k__1*qq[i]^2/d^2-alpha__3*xi/eta__1);
                        end do;

## Return all the plots
  return w;
  end proc:


Kind help with Function given two graphs G1 and G2 then co-normal product be the graph G3 given by the function


Defination is explained in youtube link

If any other explanation will surely give kind help please will surely acknowlege

This is a much simplified version of a problem I am seeing. I think I have to remove all the coerce code I added as it seems to have problems.

Made an object with constructor that take an optional argument. These optional arguments use coerce to convert different types on one type of list.

I have another proc foo() that is called with these arguments, also same optional ones, and it then creates the object passing these arguments to it. 

The problem is that if foo() is called with an optional argument itself, which will default to empty list [], I am not able to create the object now, when doing  ':-ic'=ic  since debugger gives 

Error, invalid input: too many and/or wrong type of arguments passed to ModuleCopy; first unused argument is [] = []

Even though I made sure to pass the optional argument using  ':-name'=value.

The strange thing is that this only shows in the debugger. i.e. when typing the command in the debugger window. But in my application, it does not work inside the debugger and outside since it is much more complicated setup.  This is the simplest example I could make to show the same error in the debugger.

A small example will show the problem.

   option object;
   export ode;
   export ic;

   export ModuleCopy::static:=proc(_self, proto::A, ode::`=`,
                    { ic::coerce( (ic::list(`=`))->ic, 
    end proc;
end module;

foo:=proc(ode::`=`,{ ic::coerce( (ic::list(`=`))->ic, 
    local o;
end proc:

# and now


Now the debugger window shows at the line above just before calling the object constructor. This is what happens next


But if I click continue it does not produce an error and actually works. (in my main application, with similar setup, it gives an exception).

If I can figure why debugger gives this error, may be that will help me figure my more complicated setup.  I know if I do not use coerce, the debugger error goes away. Here is a version without coerce, and it works

   option object;
   export ode,ic;
   export ModuleCopy::static:=proc(_self, proto::A, ode::`=`, { ic::list(`=`):=[] })
    end proc;
end module;
                  A := Object<<2457889631168>>

foo:=proc(ode::`=`, { ic::list(`=`):=[]})
    local o;
end proc:

#now do

Now the debugger window comes up, but now see the difference:


No error!  even though  `ic` was [] in this case also, like the first example.

So for now, I will remove all the coerce code just to get my application to work again even though I like it, but it seems to cause a problem.

question: What the first example above given an error in the debugger?  

Notice this error only shows up when using a module of type object


This is just to confirm that removing the coerce API and replacing it back as it was with traditional optional arguments as in the second example above the exception went away.  My code is way too large to post here, but that is the only difference I have.  I think there is a problem using coerce with Object constructor calling somewhere.  But I am OK now, and able to continue work.

Given a graph G say and a positive integer k

I am in look out how to remove

 edge-disjoint copies of G in G^k

That is edge disjoint copies of G into its power graph all possible ways 

Again it is the maximum number of copies I means 

Keeping this particular way can someone help kind help please

I will surely acknowledge it 

G into to GraphPower(G,k)

I was wondering if there was a way to permute a list to get a list of sums of permutations.
for example,

permute(list,2) gives me ([a,b] [b,c] [c,a])

I would like to get this instead: ([a+b],[b+c],[c+d])


the quick brown fox jumps over the lazy dog



I have a long description that contains some Maple commands.
I dont want to use # as the lines dont show up when i use

    interface(verboseproc = 3);
    printf("%P", eval(a));
end proc

The long description is. Any way around the problem?  

Test:=proc(A,B,C)  description  "Computes projective line through 2 projective points or intersert of 2 projective lines as a projective point or coincidence of piont  line   
 Does some checking on validity of inputs.   
Mobposn:- Global Variable, must = 1 or 3. 
Points are returned as <1,x,y> or <x,y,1>   
 Lines are returned as <z,x,y> or <x,y,z>,  
normalgpt :- Global Variable must be 0 or 1. 
Points with algecraic elements are not reduced to <1,x,y> or <x,y,1> if 0  
 Points are defined as row vectors and  lines as column `vectors"`; 


 end proc;

Hi, please how do I return the roots of a function in the form of I*y. The roots are [-.2381948477, -0.1434221912e-3, 0., 0.1434221912e-3, .2381948477] and I want to return them as [-.2381948477*I, -0.1434221912e-3*I, 0., 0.1434221912e-3*I, .2381948477*I]. I tried to use subs () function but couldn't work.


soln := Roots(y-0.4646295e-3*tanh(y)+0.1839145082e-2*tanh(y)/(0.6000000000e-3*y^2-0.1840000000e-2), y);

subs(soln, I*y);

I don't have Maple yet, but if it can solve this problem for me then I'm ready to purchase!

I have a probability mass function pmf(in) to define a discrete probability distribution, based on a combinatoric analysis of an object of size n. So I don't have a drv X, I have a formula to generate Xn for 0 <= n, where n + 1 is then the size of the outcome alphabet.

In other words, 
Xn = {0 <= i <= n : p(xi) = pmf(i, n)}

Where pmf(i, n) is 'well behaved' in the sense that it's not producing arbitrary results. As n increases, Xn has the same distribution simply with more detail.

So my question is, can Maple calculate the entropy, usually written H(X), of this distribution at, dare I say it, the limit, X?

Can it calculate it symbolically, or can it 'only' approximate it by a Taylor series or something?

Thanks in advance, this problem really has me stumped!

Is it possible to create a shaded area between a set of three LineChats in Maple?


I want to LinearSolve a square matrix (434160,434160) with sparse storage.

When I use SparseIterative with levelfill = 1, the commande gives a solution with very bad precision. I used many other options to get better precision without succes.

When I use SparseDirect (which I want to use), my PC (with 16G RAM) is bloqued and I must shut down it. 

Is any advices to use SparseDirect for matrix with high dimensions and sparse storage. 

Or, I must use another PC or another type of storage.

Thanks in advance.

Dear power users, could someone be so kind to help me out with this file and give me some explanation on what I did wrong? Thank you for you time and help

Why does an attempt to solve the ODEs in the uploaded worksheet fail and how can this error be removed so they can be solved?

with(plots): with(geometry):
_EnvHorizontalName := 'x':
_EnvVerticalName := 'y':
a := 7:
point(E, 0, a*sqrt(3)/2):
point(B, -a/2, 0):
point(C, a/2, 0):
point(o, 0, a*sqrt(3)/6):
point(A, 0, a/2):
point(H, 0, 0):
R := (3-sqrt(3))*sqrt(2)*a/12:
point(J, 0, a*sqrt(3)/6 - R):
triangle(Tr1, [E, B, C]):
triangle(Tr2, [A, B, C]):
StretchRotation(E1, E, B, Pi/4, clockwise, sqrt(2)/2);
StretchRotation(E2, E, C, Pi/4, counterclockwise, sqrt(2)/2);
triangle(Tr3, [E, B, E1]);
triangle(Tr4, [E, C, E2]);
triangle(Tr5, [B, C, J]);
circle(cir, [point(P1,[0,a*sqrt(3)/6]), R]):
poly := Matrix([[0, a*sqrt(3)/2], [-7/4 + (7*sqrt(3))/4, -7/4 + (7*sqrt(3))/4], [0, a/2], [7/4 - (7*sqrt(3))/4, -7/4 + (7*sqrt(3))/4]], datatype = float);
pol1 := polygonplot(poly, colour = "Magenta", transparency = 0.7, gridlines);
tex := textplot([0.2, a*sqrt(3)/2, "zE"], 'align' = {'above', 'right'});
draw([Tr1(color = cyan),
Tr3(color = green),
Tr2(color = red),
Tr4(color = grey),
Tr1(color=blue)],'view' = [-5 .. 5, 0 .. 7], 
axes = normal, scaling = constrained,size=[800,800]);
Error, (in geometry:-draw) the option must be of type equation or name
line(L1, [B, o]);
line(L1, -(7*x*sqrt(3))/6 + (7*y)/2 - (49*sqrt(3))/12 = 0);
reflection(J1, J, L1);
triangle(Tr6, [B, J1, E]);
line(L2, [C, o]);
line(L2, -(7*x*sqrt(3))/6 - (7*y)/2 + (49*sqrt(3))/12 = 0);
reflection(J3, J, L2);
triangle(Tr7, [C, J3, E]);
triangle(T1, [E, J1, A]);
triangle(T2, [E, C, E2]);
triangle(T3, [B, H, J]);
triangle(T4, [C, H, J]);

draw([cir(color = orange, filled = true, transparency = 0.1), pol1, Tr6(color = blue, filled = true, transparency = 0.2), Tr5(color = blue, filled = true, transparency = 0.2), Tr7(color = blue, filled = true, transparency = 0.2), T1(color = green, filled = true, transparency = 0.2), T2(color = green, filled = true, transparency = 0.2), T3(color = green, filled = true, transparency = 0.2), T4(color = green, filled = true, transparency = 0.2)], axes = none, scaling = constrained);
Error, (in geometry:-draw) the option must be of type equation or name

Why these errors messages ? Thank you.

First 68 69 70 71 72 73 74 Last Page 70 of 2213