MaplePrimes Questions

Hi Guys, can someone explain how to resubstitute equations I already stated, into my final form (e.g. a derivative)?

I'm unable to substitute my g(x) expression (eq. (2)) into my derivative of f(x) (eq. (4). It only works if I state explicitly which variables to substitute via algsubs (last statement). However, for that I have to rename g(x)-->h(x). Can someone explain what I'm doing wrong here? I'd love to be able to tell maple just to use already given equations (that is g(x), eq. (2)) to simplify my derivative.

Thanks guys!

The shortcut key Ctrl+Delete is used to clear a math region or delete a cell within a group, so I can delete some output manually. However, I find that there exists some long-standing functions like PrintTemporary and Monitor in Mathematica, which can be used to print intermediate values of variables temporarily (and dynamically, if possible). The term "temporarily" means that the printed output disappears at the end of a computation / when a computation is complete / when the evaluation finishes / before returning the result of an evaluation. For instance: 

(Note that certain operations require a front end.)

Is it possible to implement such functionalities in Maple? 

I get a problem while selecting elements from sets.

I have a list of two sets apparently ordered in the same order.
When I pick this, for instance, first set from each of these two samples I get the first one from the first set, and the second one from the second set.

restart:

DF := [ {diff(Theta(x), x), diff(Theta(x), x, x)}, {diff(g(x), x), diff(g(x), x, x)} ]

[{diff(Theta(x), x), diff(diff(Theta(x), x), x)}, {diff(diff(g(x), x), x), diff(g(x), x)}]

(1)

# Why are the elements of DF[2] not returned in their correct order?

i := 1;
DF[i], DF[i][1], DF[i][2];
print():
i := 2;
DF[i], DF[i][1], DF[i][2];

1

 

{diff(Theta(x), x), diff(diff(Theta(x), x), x)}, diff(Theta(x), x), diff(diff(Theta(x), x), x)

 

 

2

 

{diff(diff(g(x), x), x), diff(g(x), x)}, diff(diff(g(x), x), x), diff(g(x), x)

(2)

# I suppose we must not trust what is displayed and that lprint is more
# trustworthy?

lprint(DF)

[{diff(Theta(x), x), diff(diff(Theta(x), x), x)}, {diff(diff(g(x), x), x), diff(g(x), x)}]

 

# I expected that converting each element of DF into a list would fix this
# problem. but anothr does appear:
# "Why does the conversion into list change the order of the elements?"
# I had never seen that before

LDF := convert~(DF, list)

[[diff(Theta(x), x), diff(diff(Theta(x), x), x)], [diff(diff(g(x), x), x), diff(g(x), x)]]

(3)

 

Download Selection_from_a_set.mw

Running this command

map(sort, LDF)

displays LDF, which suggests that LDF is already sorted according to some order.
What is this order which makes diff(Theta(x), x$2) the successor of diff(Theta(x), x)  but diff(g(x), x) the successor of diff(g(x), x$2)  ?

odeSys := {diff(Theta(x), x, x)+Pr*(R*(diff(Theta(x), x))*f(x)+Nb*(diff(Theta(x), x))*(diff(Phi(x), x))+Nt*(diff(Theta(x), x))^2), N2*(diff(G(x), x, x))-N1*(2*G(x)+diff(f(x), x, x))-N3*R*((diff(f(x), x))*G(x)-f(x)*(diff(G(x), x))), diff(Phi(x), x, x)+R*Sc*f(x)*(diff(Phi(x), x))+Nt*(diff(Theta(x), x, x))/Nb, (1+N1)*(diff(g(x), x, x))+R*((diff(g(x), x))*f(x)-g(x)*(diff(f(x), x)))-M*g(x)+2*Kr*(diff(f(x), x)), (1+N1)*(diff(f(x), x, x, x, x))-R*((diff(f(x), x))*(diff(f(x), x, x))-f(x)*(diff(f(x), x, x, x)))+N1*(diff(G(x), x, x))-M*(diff(f(x), x, x))-2*Kr*(diff(g(x), x))}; cond := f(0) = 0, (D(f))(0) = 1, g(0) = 0, Theta(0) = 1, G(0) = -n*((D@@2)(f))(0), Phi(0) = 1, f(1) = lambda, (D(f))(1) = 0, g(1) = 0, Theta(1) = 0, G(1) = n*((D@@2)(f))(1), Phi(1) = 0; ans := {};

n := .5; N1 := 0.; N2 := 1.0; N3 := .1; lambda := .1; M := .1; Kr := .1; Sc := 1.0; Nb := .1; Pr := 1.0; Nt := .1; R := .5;

ans := dsolve*{cond, eval*odeSys};

hello these are the pde and Boundary conditions  i want to calculate the value of f''(0) ,Theta(0) and  Phi(0)

what is the proper cammand to get the table values for the given equation
NBVs := [eval(ans(N1*G(x)+(1+N1)*(diff(f(x), x, x))), x = 0), eval(ans(-(diff(Theta(x), x))), x = 0), eval(ans(-(diff(Phi(x), x))), x = 0)];

I have this piece of command in maple which I want to get a numerical value out of it, but instead of that it shows the sines without their numerical values. What to add to these commands to get a numerical value for x? (I checked maple's help for "numerical value", but perhaps I am a bit impatient and didn't find such a thing):

with(Degrees);
solve(x^2 = (4/sind(10))^2 + ((4 + x)/sind(20))^2 - 8*(4 + x)/(sind(10)*sind(20)), x);

I get the following:

                      1                        /  /   
---------------------------------------------- \8 \16 
                   2                                  
4 Degrees:-sind(10)  - 4 Degrees:-sind(10) + 1        

                   2                                        2   
  Degrees:-sind(10)  Degrees:-cosd(10) - 8 Degrees:-sind(10)  - 

  /                     4                  2
  \256 Degrees:-sind(10)  Degrees:-cosd(10) 

                          4                  
   - 192 Degrees:-sind(10)  Degrees:-cosd(10)

                         4
   + 32 Degrees:-sind(10) 

                         3                  
   - 64 Degrees:-sind(10)  Degrees:-cosd(10)

                         3
   + 24 Degrees:-sind(10) 

                         2                  
   + 16 Degrees:-sind(10)  Degrees:-cosd(10)

                        \      \\  
   - 2 Degrees:-sind(10)/^(1/2)//, 

                        1                        /  /   
  ---------------------------------------------- \8 \16 
                     2                                  
  4 Degrees:-sind(10)  - 4 Degrees:-sind(10) + 1        

                   2                                        2   
  Degrees:-sind(10)  Degrees:-cosd(10) - 8 Degrees:-sind(10)  + 

  /                     4                  2
  \256 Degrees:-sind(10)  Degrees:-cosd(10) 

                          4                  
   - 192 Degrees:-sind(10)  Degrees:-cosd(10)

                         4
   + 32 Degrees:-sind(10) 

                         3                  
   - 64 Degrees:-sind(10)  Degrees:-cosd(10)

                         3
   + 24 Degrees:-sind(10) 

                         2                  
   + 16 Degrees:-sind(10)  Degrees:-cosd(10)

                        \      \\
   - 2 Degrees:-sind(10)/^(1/2)//

IndependencePolynomial returns the independence polynomial for the graph G in the variable x.

For the following example, its calculation took over 20 minutes and still hasn't produced a result, and what's fatal is that it  has consumed 4G  memory.

with(GraphTheory):
G:=ConvertGraph("W|tNHEpCKoh`@@Po_WHB@CKC?WGO{G?KKCB`?OMG?_y_?Sn");
G1:=LineGraph(G);
IndependencePolynomial(G1, x) # be careful

I use  codes in  the link https://github.com/pernici/hobj.

It produced results quickly (It takes approximately 5 seconds.). So I think the built-in function " IndependencePolynomial " should be able to be improved. (Of course we are usually very concerned about their coefficients) 

Their coefficients of the independent polynomial of G1 are as follows.

[340649, 12329124, 68797662, 140606548, 139481127, 77027880, 25546428, 5303544, 700911, 58580, 2982, 84, 1]

It tells me the total number of independence sets with size 12 is 340649. 

Hi guys,

I'm wondering whether it's possible to reverse my "substitution" in order to gain a nicer looking form:

In this example, I'd like to get the last "subs" statement without having to define a new variable "g_new" but instead, maple shall use the old name, and do the "resubstituion" automatically.

I hope someone can help. I'm also happy to get other advice, regarding my problem. Thanks!

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!

First 113 114 115 116 117 118 119 Last Page 115 of 2308