dharr

Dr. David Harrington

8320 Reputation

22 Badges

21 years, 1 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@tomleslie If there is a bug as @james1482  asserted, it may be selective in some way, and not necessarily lead to failure for all graphs with loops, and as you show the trace 3 ones at least don't raise an error. It may be that IsIsomorphic is not working properly in these cases, though.

I was hoping the package might be fixed up to handle graphs with loops, but it sounds like it will just be fixed to raise error messages in the presence of loops. 

@tomleslie I agree - when I run your worksheet without change (Maple 2015.2, Windows 7) I get 25 errors and then the same 25, but not 3.

I can get various algorithms to work for the 2x2 case, but all fail for the 3x3 case, with the same error.

@mehdibaghaee If you use F[3,1] etc in your integrand, then you can't use the variable F to assign the result of the dchange - just change it to FF or something else

@nk2016  You will get the right result if you paste into 1-D Maple (try control-M on the line before you paste), but if you paste into 2-D, the != characters change into "not equal to" and you get a quite different result.

@mehdibaghaee 


 

``

PDEtools:-dchange({x = (1/2)*a*(xi+1), y = (1/2)*b*(eta+1)}, T, [xi, eta], params = [a, b], known = u0)

(1/2)*(int((1/2)*(int((1/2)*I__0*(D[3](u0))((1/2)*a*(xi+1), (1/2)*b*(eta+1), t)^2*b, eta = -1 .. 1))*a, xi = -1 .. 1))

(3)

NULL

NULL

The idea is that if you are solving, say, dy(x)/dx = -k*y(x) with y(0)=1 (y(x) is "unknown") the solution is y(x)=exp(-k*x), and if you change variables x=2*X, then the solution is y(X)=exp(-2*k*X) in which y(X) is a different function than y(x). But if you have a known function like sin(x) then you want sin(x) to change to sin(2*X)
 

Download inttt3.mw

@mehdibaghaee  add known=u0 to get this.

@mehdibaghaee Looks like a bug

Using dchange gives the expected double integral
 

NULL

PDEtools:-dchange({x = (1/2)*a*(xi+1), y = (1/2)*b*(eta+1)}, T, [xi, eta], params = [a, b])

(1/2)*(int((1/2)*(int((1/2)*I__0*(diff(u0(xi, eta, t), t))^2*b, eta = -1 .. 1))*a, xi = -1 .. 1))

(3)

``

``


 

Download inttt2.mw

aside from the main issue raised by @rlopez your loop should be "from 0 to 99" not "by 0 to 99"

@umar khan  

fsolve(y, x = 0 .. 2e6);

works for me.

@leslieglasser Still not clear what the possible inputs are. If it is a monic polynomial and the other coefficents are the variables (as in your example), then the following works:


 

restart;with(LinearAlgebra):

n:=4;
p:=w^n+add(a[i]*w^i,i=0..n-1);

4

 

w^4+w^3*a[3]+w^2*a[2]+w*a[1]+a[0]

(1)

M1:=<seq(a[n-i],i=1..n)>:M2:=<seq(w^(n-i),i=0..n)>^(%T):

M:=<<M1|DiagonalMatrix([-1$n])>,M2>;
Determinant(M);

M := Matrix(5, 5, {(1, 1) = a[3], (1, 2) = -1, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = a[2], (2, 2) = 0, (2, 3) = -1, (2, 4) = 0, (2, 5) = 0, (3, 1) = a[1], (3, 2) = 0, (3, 3) = 0, (3, 4) = -1, (3, 5) = 0, (4, 1) = a[0], (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = -1, (5, 1) = w^4, (5, 2) = w^3, (5, 3) = w^2, (5, 4) = w, (5, 5) = 1})

 

w^4+w^3*a[3]+w^2*a[2]+w*a[1]+a[0]

(2)

 

I don't have any suggestions for more complicated cases.
 

Download Companion3.mw

@leslieglasser  Well you can make a 3x3 one by bordering the 2x2 one with zeroes except for one in the 1,1 entry. But I'm guessing that isn't what you want. Can you be more specifc about your exact requirements? - I don't know what separated variables mean or nomograph in this context.

int(Heaviside(1-x^2-y^2), [x=0..1,y=0..1]); #should be Pi/4

gives -Pi/4

(I thought using even symmetry might help, but it went negative.)

@dharr If you set x=Pi/2 rather than solving for it, then you get the a, b, c values that you want.

ab should be a*b, but if I've interpreted your equation correctly, then odetest suggests that your solution is not correct.

diff(psi(x), x, x)-((b^2-a*(2*p+3))*x^2+2*a*b*x^4+a^2*x^6-energy)*psi(x) = 0;
schro := eval(%,energy=(2*p+1)*b);
odetest(psi(x)=(x^p)*exp((-a*(x^4))/4)-(b*(x^2)/2),schro);

does not return zero, meaning it is not a solution. Using dsolve gives something with Heun functions, but you probably need to check you have the right equation first.

@sunit I'm not entirely sure what you mean. You could certainly write a procedure that tested whether there were minus signs to its argument and adjusted things before passing to sin. But covering all the unexpected cases (the above one was certainly unexpected for me; I just mistakenly typed Phi instead of phi) is probably going to take more effort than it is worth. As I noted, Maple isn't human, and often outputs things in forms that are unexpected (but mathematically correct)

First 79 80 81 82 83 84 85 Page 81 of 87