nm

11353 Reputation

20 Badges

13 years, 19 days

MaplePrimes Activity


These are questions asked by nm

I need to move a term in the denominator, inside the radical sign in the numerator.  After some struggle, I can do it for a simple expression. But once the expression gets little more complicate, the method does not work.

Given expr:=sqrt(x*y)/x;  I want to force the "x" in the denominator inside the sqrt so I can simplify things. I can do this like this

restart;
expr1  := sqrt(x*y)/x;
expr1  := simplify(expr1,symbolic);
combine(expr1,symbolic);
algsubs(y/x=u,%);

But for the following similar expression, it does not work. Given expr:=sqrt(x^2+y^2)/x, I want to change to sqrt( (x^2+y^2)/x^2) or sqrt(1+ y^2/x^2) or sqrt(1 + u^2).  So the first step is as above, to force the x in denomiantor to go inside the radical. But the same steps do not work on this now

expr1:=sqrt(x^2+y^2)/x;
expr1:=simplify(expr1,symbolic);
combine(expr1,symbolic);

 

I tried radsimp(expr1); simplify(expr1,radical,symbolic); radnormal, I tried adding assuming positive everywhere. Nothing is working.

I am trying to convert an expression to be   (y/x) and then replace (y/x) to u.  BUt the first step is to get the x inside the radical and I am not sure how to do it for the second example and why it is failing. It is always hard for me in Maple to figure the right method to manipulate an expression.

Any suggestions?

I need to know if an expression contain a radical in it. For example, expr:=1/x*sqrt(x*y)  or expr:=3*(x*y)^(2/3)+5; or expr := sqrt(5), etc.. all these will return true, but for expr:=3+sin(x) it will return false.

I need to find if the expression has radical, becuase then I want to do special simplify if that is the case.

I do not want to use pattern matching, since the expression can be complicated, and thought to ask if there might be a simpler way, one of those hidden Maple commands which can do it.

I looked at  "has", "hasfun". with(PolynomialIdeals) has function IsRadical but it is only for polynomials.

Is there a way other than using patmatch?  

For some reason, Maple now hangs on the following Schrodinger PDE with initial and boundary conditions.

In Physics version 60, it works OK. No solution is returned, but it does not hang.

But when I updated to latest version of Physics, it hangs. I am not sure which version makes it hangs, I just know Maple does not hang in version 60. So the problem could have happend in any version after 60. I have not attempted to try them all to find out.

PackageTools:-Install("5137472255164416", version = 60, overwrite);
restart;
PackageTools:-IsPackageInstalled("Physics Updates");

              60


x:='x'; t:='t'; y:='y'; hbar:='hbar';f:='f';
pde:=  I* diff(f(x,y,t),t) = -hBar^2/(2*m) * (diff(f(x,y,t),x$2) +  diff(f(x,y,t),y$2)):
ic := f(x, y, 0) = sqrt(2)*(sin(2*Pi*x)*sin(Pi*y) + sin(Pi*x)*sin(3*Pi*y)):
bc := f(0, y, t) = 0,f(1, y, t) = 0, f(x, 1, t) = 0, f(x, 0, t) = 0:
sol:=pdsolve({pde,ic,bc},f(x,y,t));

            ()   #after only few seconds. No hang. good

 

Now in latest version of Physics

PackageTools:-Install("5137472255164416",  overwrite);
restart;
PackageTools:-IsPackageInstalled("Physics Updates");

                                  "74"

pde:=  I* diff(f(x,y,t),t) = -hBar^2/(2*m) * (diff(f(x,y,t),x$2) +  diff(f(x,y,t),y$2)):
ic := f(x, y, 0) = sqrt(2)*(sin(2*Pi*x)*sin(Pi*y) + sin(Pi*x)*sin(3*Pi*y)):
bc := f(0, y, t) = 0,f(1, y, t) = 0, f(x, 1, t) = 0, f(x, 0, t) = 0:
sol:=pdsolve({pde,ic,bc},f(x,y,t));

#after waiting for long time, had to terminate it
Warning,  computation interrupted

 

Why does Maple hangs on this PDE now and it did not before?

Using Maple 2018.1 on Linux

 

This pde used to be solved in 2018 as far as I know. Now it gives a strange new error

restart;
interface(showassumed=0);
pde :=  diff(u(x,t),t)+k*diff(u(x,t),x$2)+sin(2*Pi*x/L);
ic  :=  u(x,0)=f(x);
bc  :=  D[1](u)(0,t)=0, D[1](u)(L,t)=0;
sol :=  pdsolve({pde,ic,bc},u(x,t)) assuming L>0,t>0,k>0;

Error, (in assuming) when calling 'dsolve'. Received: 'found differentiated functions with same name but depending on different arguments in the given DE system: {F0_0(L), F0_0(x)}'

I am using  Physics:-Version();     MapleCloud version: 72

Do others get this erorr? Why does it show up now when it worked OK before?

update

Iam running on Linux. Here is screen shot

I want to match   a*x^b only if "a" and "b" are both not the symbol "y"

Therefore 5*x^y should fail to match, but this below matches.

restart;
expr:=5*x^y;
if patmatch(expr,conditional(a::anything*x^(b::anything),(a<>y and b<>y)),'la') then
   print("it matched, why??");
   map(assign,la):
   print("a = ",a, " b=",b);
fi;

it gives

                      "it matched, why??"
                      "a = ", 5, " b=", y

What did I do wrong? is my conditional wrong above?

 

First 153 154 155 156 157 158 159 Last Page 155 of 199