robertocooper

180 Reputation

7 Badges

4 years, 153 days

MaplePrimes Activity


These are questions asked by robertocooper

I want to check whether the solution trial_sol satisfies the following PDE by Maple:

restart:
PDE:=diff(diff(u(x,y,t),x,y)/u(x,y,t),t$2)-diff(diff(u(x,y,t),x,y)/u(x,y,t),x$2)+2*diff((u(x,y,t)^2),x,t);
trial_sol:=(x,y,t)->sqrt(r)*tan((-t*v+x+c*y) *abs(sqrt(r)/(sqrt(2*c-2*c*(v^2)))))/(sqrt(2)*sqrt(v));
pdetest(u(x,y,t)=trial_sol(x,y,t),PDE);

 

Maple says the trial_sol is not a solution for PDE.

But Mathematica says that it is a solution. What is the problem?

 

I plotted the following tangent function with Maple and Mathematica for t=4. 

restart:
func:=unapply(-tan((-4*t+x+2*y)/(2*sqrt(15)))/(2*sqrt(2)),x,y,t);
plot3d(func(x,y,4),x=-15..15,y=-15..15);

Maple 3D plot:

Mathematica 3D plot:

 

I think that Maple shows the asymptotes. Is it possible to close the asymptotes?

I have a complex PDE as follows:

where u(x, t) is a complex function.

The following function u_11(x, t) is a solution for the PDE above. 

 

 

where

 

I want to check whether the u_11(x,t) is a solution for the PDE or NOT. 

 


 How to correctly define the complex PDE in MAPLE?
 

PDE:=I*diff(u(x,t),t)+diff(u(x,t),x$2)+alpha*(abs(u(x,t))^2)*u(x,t)+ I*( gamma[1]*diff(u(x,t),x$3) + gamma[2]*(abs(u(x,t))^2)*u(x,t) + gamma[3]*diff((abs(u(x,t))^2),x)*u(x,t) )=0;

or

PDE:=I*diff(u(x,t),t)+diff(u(x,t),x$2)+alpha*(evalc(abs(u(x,t))^2))*u(x,t)+ I*( gamma[1]*diff(u(x,t),x$3) + gamma[2]*(evalc(abs(u(x,t))^2))*u(x,t) + gamma[3]*diff((evalc(abs(u(x,t))^2)),x)*u(x,t) )=0;

Let's check the solution is right or not:

k:=(gamma[2]+2*gamma[3]-3*gamma[1]*alpha)/(6*gamma[1]*gamma[3]);
omega:=(((1-3*gamma[1]*k)*(2*k-c-3*gamma[1]*(k^2))  )/(gamma[1]))+(k^2)-gamma[1]*(k^3);

uu[11]:=1/(gamma[2]+2*gamma[3])^(1/2)*(-3*(3*k^2*gamma[1]+c-2*k))^(1/2 )*sin(1/2/gamma[1]*2^(1/2)*(gamma[1]*(3*k^2*gamma[1]+c-2*k))^(1/2)*(-c*t+x))/ cos(1/2/gamma[1]*2^(1/2)*(gamma[1]*(3*k^2*gamma[1]+c-2*k))^(1/2)*(-c*t+x))*exp( I*(k*x-omega*t));
pdetest(u(x,t)=uu[11],PDE);

 

 download-code.mw

 

Why 3D .eps figures produced by Maple 2020 are often excessively large?

So, it´s a little heavy to the viewer and to compile to PDF.

  • How could we reduce the size without losing any quality? 

 

EDİT:
I wrote a procedure in order to add the legends inside plots as follows:

restart:
newlegend:=proc(f::algebraic,g::algebraic,x_left,x_right)
local A,B,location,y_min,y_max,L1,L2,rect,T,F,G:

y_min:=min(minimize(f,x=x_left..x_right),minimize(g,x=x_left..x_right));
y_max:=max(maximize(f,x=x_left..x_right),maximize(g,x=x_left..x_right));
F:=unapply(f,x):
G:=unapply(g,x):
L1, L2:=plottools:-line([x_left,0.9*y_max],[x_left+abs(x_right-x_left)/15,0.9*y_max],color=red), plottools:-line([x_left,0.7*y_max],[x_left+abs(x_right-x_left)/15,0.7*y_max],color=blue):
rect:=plottools:-rectangle([x_left,y_max-abs(y_max-y_min)/3],[x_left+abs(x_left+x_right)/4,y_max],color=cyan);
T:=plots:-textplot([[x_left+abs(x_right-x_left)/9,0.9*y_max,f],[abs(x_left+x_right)/9,0.7*y_max,g]]):
A:=plot(F(x), x=x_left..x_right, style=line, color=red   ):
B:=plot(G(x), x=x_left..x_right, style=line,  color=blue  ):

plots:-display(A, B, L1, L2, T,rect,  scaling=constrained, size=[800,300],axes=boxed);
end proc:
newlegend(sin(x),cos(x),0,2*3.14)

 

Question 1: The lines behind the cyan rectangle seem. How to make the rectangle opaque? 

Question 2:  Could you help me improving the procedure? Because I have bad results for some functions. 

For example;

newlegend(exp(x),x,0,3)

Some Suggestions:

  • If we add an option to change the location of the legends like 'northeast' or 'southwest' etc, it will be a really good procedure.
  • If we add an option to remove the rectangular like "rectangular=off", it will be great.

If you share your valuable ideas and comments, I will be very glad. 

1 2 Page 1 of 2