nm

11458 Reputation

20 Badges

13 years, 77 days

MaplePrimes Activity


These are answers submitted by nm

it is in HOME menu not the view 

 

ex: ?*sol* which at least will return solve,dsolve etc.

I assume you wanted an actual list. Not Help pages. I do not think there is built in command to do this. But you could search the maple.mla and get list of all .m files with "sol" in the name. This does not mean these will also be commands you can call from command line, but they could be

LibLocation:=cat(kernelopts(mapledir),"/lib/maple.mla");
tbl:=LibraryTools:-ShowContents(LibLocation):
tbl:=tbl[..,1]:
the_result:=map(X->`if`(StringTools:-Search("sol",FileTools:-Basename(X))>0,FileTools:-Basename(X),NULL),tbl):
nops(the_result);

    #201

So there are 201 Maple .m files in library with "sol" in the name. Here is the list

convert(the_result,set); #to remove duplicate .m files in different packages

{"Dsolve", "Expsols", "IVPsol", "Isolate", "Lsols3", "abelsol", "dsolve", 
"eqnsol", "expsols", "fsolve", "g_solve", "gfsolve", "hsols", "hsolsR", 
"isolate", "isolve", "liesol", "linsol", "msolve", "odsolve", "onesol", 
"pFqsols", "partsol", "pdsolve", "polysol", "ratsols", "rsolve", "sdsolve", 
"singsol", "sol_std", "sols_LR", "solve", "solve_c", "solvefr", "solveit", 
"solver", "sysol", "tsolve", "BlockResolve", "DARsolve_pair", "DFactorsols",
 "GBIsolve_pair", "Heunsols", "IsolateInt", "LCLMsols", "Linsolve",
 "MeijerG_solver", "MeijerGsols", "MeijerGsols2", "RiemannPsols", 
"agfmomentsolve", "algebraic_sols", "bernoullisol", "buildsol", "checksol", 
"chinisol", "clairautsol", "constcoeffsol", "constcoeffsols", "dalembertsol", 
"dperiodic_sols", "dsolve_int", "eqnsolve", "eulersols", "evolve_solution",
 "exact_sol", "exact_sol_sol", "exactsol", "formal_sol", "general_sol",
 "general_sols", "genhomosol", "hypergeomsols", "inexact_sol",
 "integrate_sols", "interp_soln", "intsolve", "isolated", "isolveROf", 
"kovacicsols", "lift_sol1", "linearsol", "matrixsoln", "mhypergeomsols", 
"newsolve", "oda_solve", "parametricsol", "particularsol", "pdesolcompare2", 
"pdesolve", "piecewisesoln", "plist_solnproc", "polysols", "process_sol", 
"ratpolysols", "recsolve", "resolveinits", "riccatisol", "separablesol",
 "seriessolve", "sol_1order_eq", "solcheck", "solnproc", "sols_with_type", 
"solvable", "solvable_type", "solveODE", "solve_LCLM", "solve_condition",
 "solve_group", "solve_inh", "solve_quadratic", "solve_sympow_o2", 
"solve_sympr_o2", "solvefor", "solvemodv", "solvemodv1", "sympowsol", 
"test_ratsols", "ODE_heu_degree_poly_sol", "algfun_series_sol", 
"build_gen_solution", "chain_resolution", "complete_solutions", 
"dverk78_solnproc", "expsols_reduceorder", "general_solutions",
 "general_solutions2", "get_particular_solution", "hypergeometricsols",
 "initialize_solution", "make_solution_module", "numeric_matrixsoln", 
"plus_min_expsols", "power_series_solution", "rational_solutions", 
"solve_LCLM_nth_root", "solve_Riccati_for_H", "solve_algebraic_form",
 "solve_conditions", "solve_semiregular", "solve_sympr_o2_no_DF1",
"solveconditionals", "test_no_solution", "FPSpower_series_solution", 
"linearODE_completesolutions", "lower_order_ODE_is_solvable", 
"power_series_solution_orig"}

Or if you wanted the .m file name with the package name also:

LibLocation:=cat(kernelopts(mapledir),"/lib/maple.mla");
tbl:=LibraryTools:-ShowContents(LibLocation):
tbl:=tbl[..,1]:
the_result:=map(X->`if`(StringTools:-Search("sol",FileTools:-Basename(X))>0,[X,FileTools:-Basename(X)],NULL),tbl):

Matrix(the_result[1..15]);  #fshow first 15 , too long to show all in Mapleprimes
 

 

This is command to use to search
 

 

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

restart;

find_function_in_maple:=proc(the_name::string)::list;
   local LibLocation:=cat(kernelopts(mapledir),"/lib/maple.mla");
   local tbl:=LibraryTools:-ShowContents(LibLocation):
   local the_result::list;
   tbl:=tbl[..,1]:
   the_result:=map(X->`if`(
       searchtext(the_name,FileTools:-Basename(X))>0,#case insenetive search
         [FileTools:-Basename(X),X],NULL),tbl):
end proc:

the_result:=  find_function_in_maple("solve"):
Matrix(the_result);

_rtable[36893622605679616236]

the_result:=  find_function_in_maple("find"):
Matrix(the_result);

_rtable[36893622605552930556]

the_result:=  find_function_in_maple("matrix"):
Matrix(the_result);

_rtable[36893622605552914908]

the_result:=  find_function_in_maple("simplify"):
Matrix(the_result);

_rtable[36893622605552907436]

 


 

Download find_command.mw

maple pattern matching is not very advanced. But you can do pattern matching on indexed like this

patmatch(S[a],A::indexed,'la')

And this gives la as A = S[a] but as far as I know you can not also add patterns to inside of the indexed also. so this does not work

patmatch(S[a],S[b::symbol]::indexed,'la')

even though it gives true, la  result is not useful, it gives

      [S[b::symbol] = S[a]]

i.e. it does not give b=a as expected.

May be there is a trick, but I could never find it. Maplesoft have not made any improvements or changes to its patmatch function for ages (they are busy with AI things these days) and help is very weak also for this function.

export to eps then convert to pdf or png as needed.  use the noborder option for the plotsetup.

This is the pdf output

restart;
currentdir("...");
p:=plot(x^2, x = 0 .. 3, background = "Blue", axes = none);
plotsetup(default);
plotsetup(ps, plotoutput="my_image",plotoptions=`color,noborder`);
print(p);
plotsetup(default);

to see the division by zero, do this

P:=convert(P,rational)
solnum :=subs(P, M);

Humm, You can not use diff(u(x, 0), t)  as is for IC. This is same for ordinary differential equation as well as partial differential equation.

You have to use the D operator. For an ode we write  D(y)(0)=0  to give initial condition y'(0)=0. not diff(y(0),x)=0

I do not know what u__t(x, 0) is supposed to mean. Is this 2D math for document mode? I do not use 2D math for input.

I found this cheat sheet on the net so I copy it here

Just remember, if you have symbolic ic, as in   y(a)=c and if you type  D(y)(a)=c, it will fail, unless you tell Maple that the dependent variable is y(x). As in 

           dsolve([ode,D(y)(a)=b],y(x))  #must add y(x) here

If IC is numeric, as in y'(0)=b then you do not need to add y(x), so this works

           dsolve([ode,D(y)(0)=b])  #no need to add y(x) here, but it will not hurt if added

Same for pde. 

But If you really want to use diff, which I do not recommend, and better stick to D, then you can use this syntax instead. 

IC := u(x, 0) = f,  eval(diff(u(x,t),t),t=0)=g;

there is no factoral, changed it to factorial. Changed your sum limit from infinity to 10. Changed plot to start from 0.01 as negative values gives undefined for H().

Try this

Download plot_problem_march_13_2025.mw

(Maple prime will not let me insert content of worksheet). Here is plain text

restart;
h:=(u)->sin(0.3*u^2):
K:=(r,v,u)-> (factorial(2*r+3)*v^r*u^(r+2))/(factorial(r)*factorial(r+2)*(v+u)^(2*r+4)):   
w:=(r,j,a,u)->(u^j-1)/((1+u)^(r+j-1))*((a*u/(1+u))*binomial(r+j-1,j)-(1-a)*(1+u)*binomial(r+j-3,j-2)+(1-a)*u*binomial(r+j-1,j)):   
B:=(r,a,u)->sum(w(r,j,a,u)*h(j/r),j=0..10):#infinity):    
H:=(r,a,u)->int(K(r,v,u)*B(r,a,v),v=0..infinity):

p1:=plot(h(u),u=-1.5*Pi..1.5*Pi,color=blue);
p2:=plot(B(10,0.9,u),u=0..1.5*Pi,color=red);
p3:=plot(H(10,0.9,u),u=0.01..1.5*Pi,color=brown); 
plots:-display([p1,p2,p3],view=[default,-2..2]);

 

If you have function say g(x) that depends on x, and want to take derivative of g(x) with respect to another function f(x), then you can do

            dg/df = (dg/dx)/(df/dx)

In your case, g=L, and f is your fA. Since both are functions of r, then you do that. This only works if both functions depend on same variable.

Maple gives

L := -r^2*((-fA(r)^4 + (-2*fB(r)^2 - 2*fC(r)^2 + 2)*fA(r)^2 + 4*D(fB)(r)*fA(r)*fC(r)*r - fB(r)^4 + (-2*fC(r)^2 + 2)*fB(r)^2 - 4*fB(r)*fC(r)*D(fA)(r)*r - 2*r^2*D(fA)(r)^2 - 1 - 2*r^2*D(fB)(r)^2)/(2*g^2*r^4) + (r*(fB(r)^2 + fC(r)^2/2 + fA(r)^2 - 2*fA(r) + 1)*H(r)^2 + (-D(K)(r)*r^2*fC(r) - 2*K(r)*fB(r)*r)*H(r) + K(r)^2*fC(r)^2*r/2 + D(H)(r)*K(r)*r^2*fC(r) + r*((fB(r)^2 + fA(r)^2)*K(r)^2 + r^2*(D(H)(r)^2 + D(K)(r)^2)/2))*v^2/(r^2)^(3/2) - lambda(((K(r)^2 + H(r)^2 - 1)*v^2)/2)^2);

-r^2*((1/2)*(-fA(r)^4+(-2*fB(r)^2-2*fC(r)^2+2)*fA(r)^2+4*(D(fB))(r)*fA(r)*fC(r)*r-fB(r)^4+(-2*fC(r)^2+2)*fB(r)^2-4*fB(r)*fC(r)*(D(fA))(r)*r-2*r^2*(D(fA))(r)^2-1-2*r^2*(D(fB))(r)^2)/(g^2*r^4)+(r*(fB(r)^2+(1/2)*fC(r)^2+fA(r)^2-2*fA(r)+1)*H(r)^2+(-(D(K))(r)*r^2*fC(r)-2*K(r)*fB(r)*r)*H(r)+(1/2)*K(r)^2*fC(r)^2*r+(D(H))(r)*K(r)*r^2*fC(r)+r*((fB(r)^2+fA(r)^2)*K(r)^2+(1/2)*r^2*((D(H))(r)^2+(D(K))(r)^2)))*v^2/(r^2)^(3/2)-lambda((1/2)*(K(r)^2+H(r)^2-1)*v^2)^2)

simplify(   diff(L,r)/diff(fA(r),r) )

(2*lambda((1/2)*(K(r)^2+H(r)^2-1)*v^2)^2*g^2*r^4+2*g^2*r^5*(D(lambda))((1/2)*(K(r)^2+H(r)^2-1)*v^2)*v^2*(H(r)*(diff(H(r), r))+K(r)*(diff(K(r), r)))*lambda((1/2)*(K(r)^2+H(r)^2-1)*v^2)-2*(-(diff(fC(r), r))*fB(r)*r+g^2*v^2*((K(r)^2+H(r)^2)*fA(r)-H(r)^2)*r^2*csgn(r)-((D@@2)(fA))(r)*r^2-fA(r)^3-fA(r)*fB(r)^2-fA(r)*fC(r)^2+fB(r)*fC(r)+fA(r))*r*(diff(fA(r), r))-(diff(H(r), r))^2*csgn(r)*g^2*r^4*v^2-g^2*v^2*csgn(r)*r^3*((diff(fC(r), r))*r*K(r)+((D@@2)(H))(r)*r^2+2*H(r)*fA(r)^2+2*H(r)*fB(r)^2+H(r)*fC(r)^2-4*H(r)*fA(r)-2*K(r)*fB(r)+K(r)*fC(r)+2*H(r))*(diff(H(r), r))-2*(r*fA(r)*(diff(fC(r), r))+((K(r)^2+H(r)^2)*fB(r)-H(r)*K(r))*g^2*v^2*r^2*csgn(r)-fB(r)^3+(-fA(r)^2-fC(r)^2+1)*fB(r)-((D@@2)(fB))(r)*r^2-fC(r)*fA(r))*r*(diff(fB(r), r))-(diff(K(r), r))^2*csgn(r)*g^2*r^4*v^2+g^2*v^2*csgn(r)*r^3*((diff(fC(r), r))*r*H(r)-((D@@2)(K))(r)*r^2-2*K(r)*fA(r)^2-2*K(r)*fB(r)^2-K(r)*fC(r)^2+2*H(r)*fB(r)+H(r)*fC(r))*(diff(K(r), r))-(g^2*r^2*v^2*(K(r)^2+H(r)^2)*csgn(r)-2*fA(r)^2-2*fB(r)^2)*fC(r)*r*(diff(fC(r), r))-g^2*r^4*v^2*fC(r)*(((D@@2)(H))(r)*K(r)-((D@@2)(K))(r)*H(r))*csgn(r)-fB(r)^4+(-2*fA(r)^2-2*fC(r)^2+2)*fB(r)^2+2*fB(r)*fC(r)*((D@@2)(fA))(r)*r^2-1-fA(r)^4+(-2*fC(r)^2+2)*fA(r)^2-2*fA(r)*fC(r)*((D@@2)(fB))(r)*r^2)/(r^3*g^2*(diff(fA(r), r)))

 

 

Download derivative_march_10_2024.mw

Student:-ODEs:-ODESteps does not support method name. If you try 

ode:=diff(y(x),x)+2*x*y(x)=x;

Student:-ODEs:-ODESteps(ode,y(x),['linear'])

#or

Student:-ODEs:-ODESteps(ode,y(x),['separable'])

You will get the same exact method used, which in this case separable.

To use different methods you need to use dsolve itself. Also DEtools:-odeadvisor(ode); is better than Student:-ODEs:-Type(ode) since it knows much more ode types. 

 

Example 1

 

ode:=diff(y(x),x)+2*x*y(x)=x;

diff(y(x), x)+2*x*y(x) = x

Student:-ODEs:-Type(ode)

{linear, separable}

dsolve(ode,['linear'])

y(x) = 1/2+exp(-x^2)*c__1

dsolve(ode,['separable'])

y(x) = -(1/2)*exp(-x^2)*c__1+1/2

 

 

 

Example 2

 

ode:=(x+y(x))*diff(y(x),x) = 1;

(x+y(x))*(diff(y(x), x)) = 1

Student:-ODEs:-Type(ode)

{}

DEtools:-odeadvisor(ode);

[[_homogeneous, `class C`], [_Abel, `2nd type`, `class C`], _dAlembert]

dsolve(ode,['dAlembert'])

y(x) = -x-1, y(x) = -x-LambertW(-c__1*exp(-x-1))-1

dsolve(ode,['Abel'])

y(x) = -x-1-LambertW(-2*c__1*exp(-1)/exp(x))

 

dsolve(ode,['homogeneous'])

y(x) = -x-LambertW(-c__1*exp(-1)/exp(x))-1

 

#to find all methods do
indices(`dsolve/methods`)

[1], [2, "linear_homogeneous other"], [high, "development"], [2, linear_homogeneous], [2, "special_functions"], [2, "hypergeometric"], [2, nonlinear], [1, high_degree], [3, linear_homogeneous], [high, linear_homogeneous], [3, linear_nonhomogeneous], [high, linear_nonhomogeneous], [2, "linear_homogeneous as given"], [1, "special"], [high, nonlinear], [1, extra], [2, linear_nonhomogeneous], [3, "development"], [1, "development"], [3, nonlinear], [2, "linear_homogeneous all methods"], [2, "linear_homogeneous in Normal Form"], [2, "development"], [1, semiclass]

`dsolve/methods`[2, "linear_homogeneous all methods"]

[quadrature, const_coeffs, Euler, linear_1, `linear/missing_y`, Kovacic, special_functions, to_const_coeffs, exact_linear, sym_1, Mathieu, MeijerG, Heun, HeunG, HeunC, HeunB, HeunD, HeunT, mu_xy, equivalent_to_Bessel, to_Riccati, Bessel, elliptic, Legendre, Whittaker, Kummer, cylindrical, hypergeometric, hypergeom1, hypergeom2, Riemann, RNF, hypergeometricsols, rationalize_lode, with_periodic_functions]

`dsolve/methods`[2, "linear_homogeneous other"]

[exact_linear, sym_1, to_const_coeffs, mu_xy, equivalent_to_Bessel, to_Riccati, with_periodic_functions]

ind:=indices(`dsolve/methods`);
for item in ind do
    cat("`dsolve/methods`",String(item));
    eval(parse(%))
od;

[1], [2, "linear_homogeneous other"], [high, "development"], [2, linear_homogeneous], [2, "special_functions"], [2, "hypergeometric"], [2, nonlinear], [1, high_degree], [3, linear_homogeneous], [high, linear_homogeneous], [3, linear_nonhomogeneous], [high, linear_nonhomogeneous], [2, "linear_homogeneous as given"], [1, "special"], [high, nonlinear], [1, extra], [2, linear_nonhomogeneous], [3, "development"], [1, "development"], [3, nonlinear], [2, "linear_homogeneous all methods"], [2, "linear_homogeneous in Normal Form"], [2, "development"], [1, semiclass]

"`dsolve/methods`[1]"

[quadrature, linear, Bernoulli, separable, inverse_linear, homogeneous, Chini, lin_sym, exact, Abel, pot_sym]

"`dsolve/methods`[2, "linear_homogeneous other"]"

[exact_linear, sym_1, to_const_coeffs, mu_xy, equivalent_to_Bessel, to_Riccati, with_periodic_functions]

"`dsolve/methods`[high, "development"]"

[k25, RNF, mu_heuristic, MeijerG, nonlinear_homogeneous, mu_poly_yn, exp_sym]

"`dsolve/methods`[2, linear_homogeneous]"

[linear_homogeneous]

"`dsolve/methods`[2, "special_functions"]"

[Bessel, elliptic, Legendre, Kummer, Whittaker, hypergeometric, Mathieu]

"`dsolve/methods`[2, "hypergeometric"]"

[hypergeom1, hyper3]

"`dsolve/methods`[2, nonlinear]"

[Liouville, WeierstrassP, JacobiSN, linearizable, linearizable_by_differentiation, mu_xy_2, missing, mu_xyp2_dynamical_symmetries_fully_reducible, mu_xyp_singularcases, sym_1, exact_nonlinear, reducible, lin_sym, `S-function`, mu_xyp_generalcase, mu_xyp2_dynamical_symmetries_not_fully_reducible]

"`dsolve/methods`[1, high_degree]"

[WeierstrassP, WeierstrassPPrime, JacobiSN, linearizable_by_differentiation, missing, dAlembert, homogeneous_B, sym_implicit]

"`dsolve/methods`[3, linear_homogeneous]"

[quadrature, const_coeffs, Euler, fully_exact_linear, to_const_coeffs, linear, exp_reduce, exact_linear, with_periodic_functions]

"`dsolve/methods`[high, linear_homogeneous]"

[quadrature, const_coeffs, Euler, fully_exact_linear, to_const_coeffs, linear, exp_reduce, exact_linear, with_periodic_functions]

"`dsolve/methods`[3, linear_nonhomogeneous]"

[quadrature, fully_exact_linear, `linear_nonhomogeneous_[0,1]`, exact_linear_nonhomogeneous, linear, exp_reduce]

"`dsolve/methods`[high, linear_nonhomogeneous]"

[quadrature, fully_exact_linear, `linear_nonhomogeneous_[0,1]`, exact_linear_nonhomogeneous, linear, exp_reduce]

"`dsolve/methods`[2, "linear_homogeneous as given"]"

[quadrature, const_coeffs, Euler, linear_1, `linear/missing_y`, Kovacic, RNF, special_functions, MeijerG, Heun, hypergeometricsols, rationalize_lode]

"`dsolve/methods`[1, "special"]"

[80, 81]

"`dsolve/methods`[high, nonlinear]"

[linearizable_by_differentiation, linearizable, reducible, exact_nonlinear, missing, mu_formal, lin_sym]

"`dsolve/methods`[1, extra]"

[inverse_Riccati, Abel_AIL, `sym_pat/[F(x)*G(y),0]`, `sym_pat/[F(x),G(x)]`, `sym_pat/[F(x),G(y)]`, `sym_pat/[F(x)+G(y),0]`, `sym_pat/[F(x),G(x)*y+H(x)]`, sym_pat, exp_sym]

"`dsolve/methods`[2, linear_nonhomogeneous]"

[quadrature, fully_exact_linear, `linear_nonhomogeneous_[0,1]`, `linear_nonhomogeneous_[0,F(x)]`, linear_nonhomogeneous]

"`dsolve/methods`[3, "development"]"

[k25, RNF, mu_heuristic, linear_patterns, MeijerG, nonlinear_homogeneous, mu_y2, mu_poly_yn, exp_sym, pFq, `3F2`, `2F2`, `1F2`, `0F2`]

"`dsolve/methods`[1, "development"]"

[linearizable_by_differentiation, linearizable, con_sym, WeierstrassP, WeierstrassPPrime, equivalent_to_Abel, Abel_AIR, special, Riccati_symmetries]

"`dsolve/methods`[3, nonlinear]"

[linearizable_by_differentiation, linearizable, missing, exact_nonlinear, reducible, mu_formal, lin_sym]

"`dsolve/methods`[2, "linear_homogeneous all methods"]"

[quadrature, const_coeffs, Euler, linear_1, `linear/missing_y`, Kovacic, special_functions, to_const_coeffs, exact_linear, sym_1, Mathieu, MeijerG, Heun, HeunG, HeunC, HeunB, HeunD, HeunT, mu_xy, equivalent_to_Bessel, to_Riccati, Bessel, elliptic, Legendre, Whittaker, Kummer, cylindrical, hypergeometric, hypergeom1, hypergeom2, Riemann, RNF, hypergeometricsols, rationalize_lode, with_periodic_functions]

"`dsolve/methods`[2, "linear_homogeneous in Normal Form"]"

[linear_1]

"`dsolve/methods`[2, "development"]"

[mu_xyp, mu_xyp2, mu_formal, mu_heuristic, exp_reduce, linear, Bessel2, Whittaker_old, nonlinear_homogeneous, exact_linear_nonhomogeneous, mu_y1, mu_x_y1, mu_y_y1, mu_poly_yn, exp_sym, sym_pat, sym_8]

"`dsolve/methods`[1, semiclass]"

[Riccati, inverse_Riccati, equivalent_to_Abel, linearizable, linearizable_by_differentiation]

 

 

Download specifiy_methods_of_dsolve.mw

you did not say which maple version you are using. but in Maple 2024 it does it just by using simplify

If this does not work in your version, try simplify(e,trig) and if this does not work, try convert(e,tanh)

one possible way is to use  TypeTools[AddType]

restart;

 

TypeTools[AddType]( my_type_A, n->evalb(n::integer and (n=10 or n=20 or n=30)) );

my_proc:=proc(a::integer, b::my_type_A)
  print(b)
end proc;

proc (a::integer, b::my_type_A) print(b) end proc

my_proc(3,10)

10

my_proc(3,7)

Error, invalid input: my_proc expects its 2nd argument, b, to be of type my_type_A, but received 7

my_proc(3,30)

30

Download my_type.mw

Another option is to use `type/....`  

I am no expert much in this area to know which method is better or more robust. 

restart

`type/my_type_A` := n->evalb(n::integer and (n=10 or n=20 or n=30))

proc (n) options operator, arrow; evalb(n::integer and (n = 10 or n = 20 or n = 30)) end proc

my_proc:=proc(a::integer, b::my_type_A)
  print(b)
end proc;

proc (a::integer, b::my_type_A) print(b) end proc

my_proc(3,10)

10

my_proc(3,7)

Error, invalid input: my_proc expects its 2nd argument, b, to be of type my_type_A, but received 7

my_proc(3,30)

30

Download my_type_2.mw

The advantage of making a name for the type, is that you can use this name in other places in your code to check if variable is of this type. Like this

restart

`type/my_type_A` := n->evalb(n::integer and (n=10 or n=20 or n=30))

proc (n) options operator, arrow; evalb(n::integer and (n = 10 or n = 20 or n = 30)) end proc

b:=30;
if b::my_type_A then
   "yes";
else
   "no";
fi;

30

"yes"

b:=31;
if b::my_type_A then
   "yes";
else
   "no";
fi;

31

"no"

Download my_type_3.mw

You need to tell it that x is real also.

is(0 < x^2 + x + y) assuming (0 < x + y), x::real

  # true

Because, what happens if x=-I and y=I+1? then x+y is 1, right? but x^2 is now -1, and -1+1 is zero which is not positive.

 

I've collected all Maple tech letters sometime ago from different corners of the internet.

Here is Vol 1, No 1  attached

MapleTech_volume_1_number_1_spring_1994.pdf

 

use simplify with side relation

is ( simplify( x*y*z, {x*z=0}) = 0 )

gives true

So instead of 

 simplify( x*y*z ) assuming x=0

Which does not give zero, use 

simplify( x*y*z ,{x=0})

which now gives zero.

The order is important for type. Here is a much simpler example

type(1+"s",`&+`(integer,string));

    #true

Now change the order, it gives false

type(1+"s",`&+`(string,integer));

   #false

That is why your third one gave true but the first two did not, The third one had the same exact order as how Z is written.  

One would think the order of `+` operands should not matter but  it does for type.

The only way I know how to make it match all, is to use alternatives and enumerate all possible cases.  For the above example, that will be

type(1+"s", {`&+`(integer,string) 
             ,`&+`(string,integer) 
            }
    )
#true

So you'd do the same for your input. 

I do not know other ways to do it. Using `Or` does work. At least in my attempts. So I always do it this way, by listing all possible alternatives.  

1 2 3 4 5 6 7 Last Page 2 of 20