MaplePrimes Questions

Have a output of similar below form

say

output := table([(3, 6) = ["C-C", 0.99414575], (3, 4) = ["C-C", 1.00000000], (6, 13) = ["C-H", 1.11484141], (2, 7) = ["O-C", 0.99996130], (3, 5) = ["C-C", 1.60953223], (4, 7) = ["C-C", 0.99414575], (3, 7) = ["C-C", 1.61174619], (10, 16) = ["C-H", 0.61996904], (3, 8) = ["C-C", 0.99997800], (6, 7) = ["C-C", 1.60940000], (5, 12) = ["C-H", 0.61992962], (5, 6) = ["C-C", 0.99404781], (8, 10) = ["C-C", 0.99997800], (5, 13) = ["C-H", 0.61992962], (11, 17) = ["C-H", 0.61996904], (4, 5) = ["C-C", 1.60953223], (9, 15) = ["C-H", 0.62000000], (9, 11) = ["C-C", 0.99997800], (4, 6) = ["C-C", 1.61174619], (4, 9) = ["C-C", 0.99997800], (5, 7) = ["C-C", 0.99404781], (10, 11) = ["C-C", 1.00000000], (1, 6) = ["O-C", 0.99996130], (7, 12) = ["C-H", 1.11484141], (8, 14) = ["C-H", 0.62000000]])

Create a function which take the above table as and ouputs an weighted undirected Graph G.

I would like to get undirected graph such that 

condition 

1) We need to form a square matrix say A1 of dimension n cross n where n is the larges among all the integers in the (i,j) that list the above example 17 is the highest among all of the (i,j) sets.

2) then form a weighted square matrix 17 cross 17 where second element of the inside list has to be wiegth in that position 

That is the in the matrix (3,6) and (6,3) should have weight  0.99414575,  in the matrix (3,4) and (4,3) should have weight 1.00000000 etc.

3) Then we need to remove all rows and columns which matches to H

That 

(10, 16) = ["C-H", 0.61996904] here H goes for 16 so we remove Row 16 and Column 16 of A1

again (5, 12) = ["C-H", 0.61992962] here H goes for 12 so we remove Row 12 and Column 12 of A1

so if we could remove all rows and coulmns where H is their in A1 in one go 

as if I remove one row and columns then immedialety row and column number will changes so need to be very careful.

Then the function changes the square weighted matrix to a graph outputs the graph.

The table will of similar form but only thing is number of elements in the table can change.

Kind help

dear all
I would like to solve the following differential equation in Maple Numerically.

restart;
pde := I*10*diff(u(k, t), t) + (diff(u(k, t), t, t)) -16* u(k, t) = 0;
ics := u(k, 0) = sqrt(Pi/2)*csch(Pi/2*k), (D[2](u))(k, 0) = -(1/4)*sqrt(2)*Pi^(3/2)*csch((1/2)*Pi*k)*coth((1/2)*Pi*k)
bcs := u(0, t) = 0, u(100, t) = 0;
sol := pdsolve(pde, {ics, bcs}, numeric, range = 0 .. 1, output = listprocedure);
sol;

here the sech(x)^2 in real space and corresponding fourier transformaation is the initial condition

the Gaussian function as initial condition is also an alternative.

How can I solve it?

Hello, I am trying to evaluate this summation, but it keeps giving me a "Error, (in H) bad index into Vector", I can`t find the problem in function, would somebody helps? thanks.

My function:

with(linalg); H := proc (z, aa, AA, bb, BB, m, n, p, q) mu0 := sum('BB'[i], i = 1 .. q)-(sum('AA'[i], i = 1 .. p)); beta0 := (product('AA'[i]^(-'AA'[i]), i = 1 .. p))*(product('BB'[i]^(-'BB'[i]), i = 1 .. q)); if z <> 0 and 0 < mu0 or 0 < abs(z) and abs(z) < 1/beta0 and mu0 = 0 then do s := Vector([seq(-('bb'[i]-v)/'BB'[i], i = 1 .. m)]); Hz := sum(sum((product(('`if`')(i <> h, GAMMA('bb'[i]+'BB'[i]*'s[h]'), 1), i = 1 .. m))*(product(('`if`')(i <> h, GAMMA(1-'aa'[i]-'AA'[i]*'s[h]'), 1), i = 1 .. n))*(-1)^v*z^(('bb[h]'+v)/'BB[h]')/(('`if`')(m < q, product(('`if`')(i <> h, GAMMA(1-'bb'[i]-'BB'[i]*'s[h]'), 1), i = m+1 .. q), 1)*`if`(n < p, product(('`if`')(i <> h, GAMMA('aa'[i]+'AA'[i]*'s[h]'), i = n+1 .. p), 1), 1)*factorial(v)*'BB[h]'), h = 1 .. m), v = 0 .. 10) end do end if; return Hz end proc

>evalf(H(.547, Vector([-23-j]), Vector([.5]), Vector([0, -24-j]), Vector([1, .5]), 1, 1, 1, 2))

Hello,

I am trying to solve the self similarity problem for external natural convection which is the following coupled problem

  •     3/4*F(eta)*Theta(eta)'  = Theta(eta)''
  •     1/2 (F(eta)')^2 - 3/4 F(eta)*F(eta)'' = Pr*(Theta(eta) - F(eta)''')

where Pr is a constant and  ()' denotes differentiation with respect to eta. The boundary conditions are:

  •     at eta = 0, F = 0, F'=0, Theta = 1
  •     at eta -> infinity, F' = 0, Theta = 0

I tried the following but I cannot obtain a solution

``

Pr:=1

1

(1)

etamax := infinity

infinity

(2)

``

eq:= 3/4*F(eta)*diff(theta(eta),eta) = diff(theta(eta),eta,eta),1/Pr*(1/2*diff(F(eta),eta)^2 - 3/4*F(eta)*diff(F(eta),eta,eta)) = -diff(F(eta),eta,eta,eta) + theta(eta)

(3/4)*F(eta)*(diff(theta(eta), eta)) = diff(diff(theta(eta), eta), eta), (1/2)*(diff(F(eta), eta))^2-(3/4)*F(eta)*(diff(diff(F(eta), eta), eta)) = -(diff(diff(diff(F(eta), eta), eta), eta))+theta(eta)

(3)

NULL

 

NULL

bcs := F(0) = 0, theta(0)=1, D(F)(0)=0,theta(etamax)=0,D(F)(etamax)=0

F(0) = 0, theta(0) = 1, (D(F))(0) = 0, theta(infinity) = 0, (D(F))(infinity) = 0

(4)

NULL

sol:=dsolve([eq,bcs],[F(eta),theta(eta)])

``

Download wip.mw

How does this happen, that is, what is the algorithm failure here? 

for L in [[4, 2], [8, 5], [9, 2], [16, 14], [25, 2]] do
traperror(MinimumPermutationRepresentationDegree(SmallGroup(op(L))))
end do;

I have been unable to add a directed light source to my plot3d drawings.  Perhaps I am misreading the documentation.  In the following experiment, I attempt to shine a red light from the direction (phi,theta) but changing the values of phi and theta don't seem to change the scene's lighting.  Can you change the lighting in your Maple?

restart;
with(plottools):
with(plots):
Explore(display(sphere(), style=surface, color=yellow, light=[phi,theta,1,0,0]),
	phi=0..Pi, theta=0..Pi);

The documentation shows that one can set up custom latex form for different function/variables: 
https://www.maplesoft.com/support/help/maple/view.aspx?path=latex/functions

This is very nice, but how do I see what's currently set? 

I was hoping something like:
showstat(`latex/AntiCommutator`); 
or 
eval(`latex/hypergeom`); 
would work, but these don't.

I would like to simply copy/paste what maple already does and only make slight adjustments - don't want to have to write these from scratch. 

thanks!

How to remove the ln(e) in the fianl answer shown in the picture, ( must be Maple 15), thanks

Hi,

I want to solve system of PDE equations by maple and i dont know how can i write it codes that can solve them for me. Can you create the code for the equation

Thank you

restart;
with(geometry):
with(plots):
_EnvHorizontalName = 'x':
_EnvVerticalName = 'y':
point(A, [-2, 7]):
point(B, [-5, -2]):
point(C, [8, -2]):
triangle(ABC, [A, B, C]):
display([draw[A(color = black, symbol = solidcircle, symbolsize = 6), 
               B(color = black, symbol = solidcircle, symbolsize = 6), 
               C(color = black, symbol = solidcircle, symbolsize = 6), 
               ABC(color = blue)], 
         textplot([[coordinates(A)[], "A"], 
              [coordinates(B)[], "B"], 
              [coordinates(C)[], "C"]],
              align = [above, right])], 
              axes = none);
Would you explain to me why this error ? Thank you.
Error, (in plots:-display) expecting plot structures but received: [geometry:-draw[A(color = black, symbol = solidcircle, symbolsize = 6), B(color = black, symbol = solidcircle, symbolsize = 6), C(color = black, symbol = solidcircle, symbolsize = 6), ABC(color = blue)]]

Edits: In fact it is a set partition problem.

 

I have the following subsets: 

s:={"a","b","c","d","e","f"}:

I want to divide the set into 2 groups such that each group has exactly 3 elements. We want to generate all solutions. Note that we treat ({"a", "b", "c"}|{"d", "e", "f"}) and ({"d", "e", "f"}|{"a", "b", "c"}) as the same solution.

So first I used the choose function to generate all 3-subsets and then filtered for duplicate solutions.

with(combinat):
M:=[op(choose({"a","b","c","d","e","f"},3))]:
l:=[ListTools:-Categorize((x,y)-> is(x =`minus`(s, y)),M)]:
seq(l[i][1],i=1..10)

{"a", "b", "c"}, {"a", "b", "d"}, {"a", "b", "e"}, {"a", "b", "f"}, {"a", "c", "d"}, {"a", "c", "e"}, {"a", "c", "f"}, {"a", "d", "e"}, {"a", "d", "f"}, {"a", "e", "f"}

But I feel like the solution is a bit inefficient. In fact, we only need half of all 3-subsets. I wonder if we can only keep one representative member of the same  solutions when generating the 3-subsets. 

gengcuts.mw

 In fact, the problem can be generalized as follows: given a list of n elements, divide it into m groups and generate all solutions. Similarly,  the same solution is generated only once. 

Why there is an error? Is any part missing in the if statement?

restart

rel := w+(1/2)*sqrt(960*c^6*gamma^2*k^2-336*c^4*gamma^2*k^4+64*c^2*gamma^2*k^6-4*gamma^2*k^8+576*alpha*c^6*gamma*k-288*alpha*c^4*gamma*k^3-16*alpha*c^2*gamma*k^5+8*alpha*gamma*k^7-144*alpha^2*c^4*k^2-48*alpha^2*c^2*k^4-4*alpha^2*k^6+128*c^4*gamma*k^2-40*c^2*gamma*k^4+4*gamma*k^6+48*alpha*c^4*k-16*alpha*c^2*k^3-4*alpha*k^5+4*c^2*k^2-k^4)

w+(1/2)*(960*c^6*gamma^2*k^2-336*c^4*gamma^2*k^4+64*c^2*gamma^2*k^6-4*gamma^2*k^8+576*alpha*c^6*gamma*k-288*alpha*c^4*gamma*k^3-16*alpha*c^2*gamma*k^5+8*alpha*gamma*k^7-144*alpha^2*c^4*k^2-48*alpha^2*c^2*k^4-4*alpha^2*k^6+128*c^4*gamma*k^2-40*c^2*gamma*k^4+4*gamma*k^6+48*alpha*c^4*k-16*alpha*c^2*k^3-4*alpha*k^5+4*c^2*k^2-k^4)^(1/2)

(1)

crit_points := solve(diff(rel, k) = 0, k); rel_at_crit := subs(k = crit_points, rel)

"#` determine the maxima and minima by checking the sign of the second derivative at the critical points`  for i from 1 to nops(crit_points) do    if (eval(diff(diff(rel, k), k), k = crit_points[i]) > 0) then      print("Minimum at k = ", crit_points[i], " with value ", rel_at_crit[i]);    else if (eval(diff(diff(rel, k), k), k = crit_points[i]) < 0) then      print("Maximum at k = ", crit_points[i], " with value ", rel_at_crit[i]);    else      print("Saddle point at k = ", crit_points[i], " with value ", rel_at_crit[i]);    end if;  end do; "

Error, invalid if statement termination

"#` determine the maxima and minima by checking the sign of the second derivative at the critical points`  for i from 1 to nops(crit_points) do    if (eval(diff(diff(rel, k), k), k = crit_points[i]) > 0) then   print("Minimum at k = ", crit_points[i], " with value ", rel_at_crit[i]);    else if (eval(diff(diff(rel, k), k), k = crit_points[i]) < 0) then   print("Maximum at k = ", crit_points[i], " with value ", rel_at_crit[i]);    else   print("Saddle point at k = ", crit_points[i], " with value ", rel_at_crit[i]);    end if;  end do; "

 

NULL

Download maxnmin.mw

I input this codes:

latex((4*n-1)/9-7/16*n)

\frac{n}{144}-\frac{1}{9}

This is not the output I expected.  I would like to obtain an expression similar to the one below.

\frac{4 n-1}{9}-\frac{7}{16}n

How can I achieve this, as Maple seems to have processed it internally.

Does maple over-understand the expression.

Good day,
 

1. Please I need your greatest help. Can anyone please help me to run the examples on the attached papers on Maple software?

 2. Also help me to plot the graphs along with the exact solution

 3. If possible with tables

 I tried but did not get the results as expected. I shall be very grateful if I can get assistance from you

 

Thanks
 

First 230 231 232 233 234 235 236 Last Page 232 of 2425