Maple 2019 Questions and Posts

These are Posts and Questions associated with the product, Maple 2019

I have written the function V(R) in Maple like this:

"V(R) := D_e * (1 - exp(-a * (R - R_e)))^2"

Where D_e, a and R_e are constants but Maple evaluates them as variables. Then before the function I have now written:

"Parameters(D_e, a, R_e)" and even "constants := D_e, a, R_e" (if that helps)

I would like to find the limit as R approaches infinity, but Maple just substitutes R with ∞ in the function. The answer should just be D_e, and not "D_e * (1 - exp(-a * (∞ - R_e)))^2"

Thanks for any help out there :)

 I'd like to get all at most 15 vertices Non-isomorphic  connected  bipartite graphs. One way is to use the function NonIsomorphicGraphs(k, output = graphs, outputform = graph, restrictto = connected).

with(GraphTheory):

k:=8;
s1:=[NonIsomorphicGraphs(k,restrictto = connected,output=graphs,outputform=graph)]:
bipartitegraph:=select[flatten](x->IsBipartite(x)=true, s1):
nops(bipartitegraph);

But when k=9, it is slow, I doubted that the code 

By Checking out the encyclopedia,http://oeis.org/A033995 , we knew the following number of bipartite graphs datas of , at most 14, they are not many(the datas contain  no-connected conditions)

 

so I read the help document about  

awesome.

Ps: I know  in SageMath  we can get all bipartite graphs quikly even though n>=10  by  using the 

for g in graphs.nauty_geng('-c -b 10 -g'):
 
But I hope it can be realized in Maple. 

Thanks!

 

When I use block of 'if' in procedure Work I see empty graph. If there are no 'if' everything works properly

 

with(Maplets);
with(Elements);
with(Tools);
with(plots):
work := proc() local f, k, x0, y0, result, l;
l := Get(L::algebraic);
x0 := Get(X::algebraic);
y0 := Get(Y::algebraic);
result := subs(x = x0, l);
f := plot(l);
k := plots:-pointplot([x0, y0]);
plots[plots:-display]({f, k});

 

THESE BLOCK OF 'if'
if result = y0 then Set(res = "Belongs");
elif y0 < result then return Set(res = "Above");
elif result < y0 then return Set(res = "Below");
end if;


end proc;

 

mpt := Maplet(Window("Test", [[Plotter[f]()],
["Line eq", TextField[L]()],
["X ", TextField[X]()],
["Y ", TextField[Y]()],
["Result ", TextField[res](editable = false)],
[Button("Результат", Evaluate(f = 'work()')), Button("OK", Shutdown([res]))]]));


Display(mpt);

 

With block of 'if'

Without block of 'if'

Hi, I'm importing an Excel file then trying to feed it to FrequencyTable. While it works, it shows me some range intervals that seem to be calculated by the function. I would like to use a specific interval, but I can't find what parameter to use. Bins won't do the trick, since it doesn't let me specify the range. 

Thanks in advancce. 

with(GraphTheory):
s1:=[NonIsomorphicGraphs(6,restrictto = connected,output=graphs,outputform=graph)]:
DrawGraph~(s1);

 

fourthNONLINEARBOUD234.mwfourthNONLINEARBOUD234.mw
 

``

NULL

NULL

NULL

[0., 0, 0.]

(1)

restart

with(LinearAlgebra)

``

for i to 1 do for j from 0 by .1 to 1 do Exact[j] := exp(j); Y[0] := proc (x) options operator, arrow; 1+x-(58/9)*x^2-3*x^2*exp(1)+(64/9)*x^2*exp(3/4)+(40/9)*x^3+4*x^3*exp(1)-(64/9)*x^3*exp(3/4) end proc; Ics := Z(0) = 1, (D(Z))(0) = 1, Z(1) = exp(1), Z(3/4) = exp(3/4); exp(-x) := convert(taylor(exp(-x), x = 0, 5), polynom); f := proc (x) options operator, arrow; 0 end proc; p := proc (x) options operator, arrow; 0 end proc; q := proc (x) options operator, arrow; 0 end proc; r := proc (x) options operator, arrow; 0 end proc; u := proc (x) options operator, arrow; 0 end proc; eq[i] := diff(Z(x), `$`(x, 4)) = 0.1e-2*(diff(Y[i-1](x), `$`(x, 4)))+.999*(f(x)+exp(-x)*Y[i-1](x)*Y[i-1](x)); s[i] := dsolve({Ics, eq[i]}, Z(x)); Y[i] := unapply(op(2, s[i]), x); App[j] := evalf(Y[i](j)); Er[j] := abs(App[j]-Exact[j]); A[i] := print([App[j], Exact[j], Er[j]]) end do end do

[1., 1, 0.]

 

[1.105170012, 1.105170918, 0.906e-6]

 

[1.221399998, 1.221402758, 0.2760e-5]

 

[1.349854378, 1.349858808, 0.4430e-5]

 

[1.491819577, 1.491824698, 0.5121e-5]

 

[1.648716753, 1.648721271, 0.4518e-5]

 

[1.822115950, 1.822118800, 0.2850e-5]

 

[2.013751870, 2.013752707, 0.837e-6]

 

[2.225541500, 2.225540928, 0.572e-6]

 

[2.459603808, 2.459603111, 0.697e-6]

 

[2.718281833, 2.718281828, 0.5e-8]

 

[2., 1, 1.]

 

[2., 1.105170918, .894829082]

 

[2., 1.221402758, .778597242]

 

[2., 1.349858808, .650141192]

 

[2., 1.491824698, .508175302]

 

[2., 1.648721271, .351278729]

 

[2., 1.822118800, .177881200]

 

[2., 2.013752707, 0.13752707e-1]

 

[2., 2.225540928, .225540928]

 

[2., 2.459603111, .459603111]

 

[2., 2.718281828, .718281828]

(2)

``

``


 

Download fourthNONLINEARBOUD234.mw

 

Hello.

With the Curvefitting[Spline] command I calculate a piecewise function from discrete points. I perform this action 250 times and save the piecewise functions into a matrix. The process takes quite a while. Is it possible to save said matrix to a file such that I may call it from other maple worksheets, instead of re-calculating the matrix every time I want to use it?

Thanks. 

Hi. I'm using the interactive plot builder. I click in add button in the expression section and then enter:

2x+y+2x-15=0

and click the accept button and I get an error message saying "Please enter a valid Maple expression". How am I supposed to enter the equation of the plane?

Thanks in advance!

  1. The member() function doesn't find the value in a table if that value is associated with the key (aka index)  '0'
  2. Doesn't seem to matter if the table is created explicitly (ie by calling table()) or implicitly (ie by simple indexed assignment)
  3. member() doesn't seem to have the same issue with a zero-based Array()
  4. I'm pretty sure that this is a bug, but I'd like some opinions before I report it
  5. This behaviour has been around for a while: same thing happens all the way back to Maple 18. (I can't check anything earlier)

Check the ouput of member(10,t1) in the attached

  restart:

  interface(version);

`Standard Worksheet Interface, Maple 2019.1, Windows 7, May 21 2019 Build ID 1399874`

(1)

#
# Explicit table creation: same thing
# happens if table is created "implicitly"
#
  t1:=table([0=10, 1=12]);
  member(10,t1);
  member(12,t1);

table( [( 0 ) = 10, ( 1 ) = 12 ] )

 

false

 

true

(2)

#
# Zero-based Array
#
  A:=Array(0..1, [10, 12]);
  member(10,A);
  member(12,A);

Array(%id = 18446744074528920750)

 

true

 

true

(3)

 

Download memberProp.mw

This is a solution to a PDE. I solved this by hand and got a much simpler solution. Maple solution is also correct but very complicated. They are both the same, as when I plot them  for different t values, they match. I am sure they are the same. 

How would one simplify Maple solution to the simpler one? Tried number of options to simplify, but can't get Maple to simplify it to the hand solution. Also tried different assumptions on t and x (real, positive etc..) nothing helps.

Maple 2019.1 on windows 10. Physics 436

restart;
pde := diff(u(x,t), t) +1/(x^2+4)*diff(u(x,t),x) =0:
ic:=u(x,0)=exp(x^3+12*x):
maple_sol:=rhs(pdsolve([pde,ic],u(x,t)));

exp(((1/2)*(4*x^3+48*x-12*t+4*(9*(-(1/3)*x^3-4*x+t)^2+256)^(1/2))^(1/3)-8/(4*x^3+48*x-12*t+4*(9*(-(1/3)*x^3-4*x+t)^2+256)^(1/2))^(1/3))*(((1/2)*(4*x^3+48*x-12*t+4*(9*(-(1/3)*x^3-4*x+t)^2+256)^(1/2))^(1/3)-8/(4*x^3+48*x-12*t+4*(9*(-(1/3)*x^3-4*x+t)^2+256)^(1/2))^(1/3))^2+12))

hand_sol:=exp(x^3 - 3*t + 12*x); #this is much simpler

exp(x^3-3*t+12*x)

simplify(maple_sol)

exp(3*((4*x^3+48*x-12*t+4*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))^(1/3)-4)*((-(1/3)*x^3+t-4*x-(1/3)*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))*(4*x^3+48*x-12*t+4*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))^(1/3)-(4/3)*(4*x^3+48*x-12*t+4*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))^(2/3)-64/3)*((4*x^3+48*x-12*t+4*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))^(1/3)+4)/(-8*x^3+24*t-96*x-8*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2)))

plot([subs(t=0.1,maple_sol),subs(t=0.1,hand_sol)],x=-1..0.3)

plot([subs(t=5,maple_sol),subs(t=5,hand_sol)],x=-1..0.3)

 

 

Download how_to_simplify.mw

hi

can anyone help me with this error.

why maple2019 gives result of trigonometric function in terms of I.

snapshot attached

 

I have an arc length parametrization question. The problem says to find a function g(s) that you can use to calculate the arc length parametrization, then find a formula for the arc length parametrization. I have r(t)= <cos(2t), sin(3t), 4t>. How would I do this?

I have a question about animating 3d space curves (vector-valued functions). I have a curve that has a component x(t), component y(t), component z(t), and a time, t. The problem says to create an animation of a point moving around the curve. How do I do this?

Thank you.

first I define some constants (note I may change the constants later based on the context of the application)

p_l := 10^(-15);     
epsilon := 1.09*10^(-10);
p_B := 1.09*10^(-8);

n_A := 10^7;         
k_A := 0;
n_B := 10^8; 
k_B := 0;

then I define a function l(x,y):

l := (x, y) -> x^k_A*(1 - x)^(n_A - k_A)*y^k_B*(1 - y)^(n_B - k_B)

Now I use both with(GlobalOptimization) and with(Optimization) to maximize l(x,y) give some constraints and I get:

GlobalSolve(l(x_1, y_1), x_1 = p_l .. epsilon, y_1 = p_B .. 1, maximize, initialpoint = [x_1 = 0, y_1 = 0]);
  [-0., [x_1 = 1.09000000000000 10^(-10)   , y_1 = 0.633548870211381]]


Maximize(l(x_1, y_1), x_1 = p_l .. epsilon, y_1 = p_B .. 1, initialpoint = [x_1 = 0, y_1 = 0]);
 [0.33621648834727435318,  [x_1 = 1.00000000000000 10^(-15)   , y_1 = 1.0900000000000000000 10^(-8)  ] ]

 

Clearly the second answer is right and the first is wrong... I am not sure why the ``global optimazation'' is doing worse than the normal and free ``optimazation''.. Am I using the GlobalSolve in a wrong way??

Hello people in mapleprimes,
I have a question.

I use maple2019 with mac os 10.14.6.

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G95

With maple2019, errors appears.

> kernelopts(version);
        Maple 2019.1, APPLE UNIVERSAL OSX, Jun 6 2019, Build ID 1403154

> assume(a>-1,b>0);
> additionally(a<=1);
> about(a);
Originally a, renamed a~:
  is assumed to be: FAIL

> assume(tau<1,tau>0,s<1,s>0):
> a_e1:=tau*s*(1+tau)<tau*s+tau+s-1:
> b_e2:=expand(lhs(a_e1)-rhs(a_e1))<0:
>  b_e3:=collect(b_e2,s,factor):
> solve(b_e2,s) assuming tau<1;
Error, (in assuming) when calling 'property/ConvertProperty'. Received: 'FAIL
is an invalid property'

On the other hand, with maple2018, they do not.

> kernelopts(version);
       Maple 2018.2, APPLE UNIVERSAL OSX, Nov 16 2018, Build ID 1362973

> assume(a>-1,b>0);
> additionally(a<=1);
> about(a);
Originally a, renamed a~:
  is assumed to be: RealRange(Open(-1),1)

> assume(tau<1,tau>0,s<1,s>0):
> a_e1:=tau*s*(1+tau)<tau*s+tau+s-1:
> b_e2:=expand(lhs(a_e1)-rhs(a_e1))<0:
> b_e3:=collect(b_e2,s,factor):
> solve(b_e2,s) assuming tau<1;
                                    1
                               [{-------- < s~}]
                                 1 + tau~

Are errors due to some bugs in maple2019 when being used with mac os 10.14.6?

Take care.

taro

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