Maple 2018 Questions and Posts

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

Hello all

I am teaching engineering and I use Maple to make handouts with solutions to assignments.

In Maple 2017 I used interface(displayprecision=4) to make maple it display all outputs with 4 significant digits.

Just to be clear:

If the actual value is 123.456789, then interface(displayprecision=4) makes it display 123.5 in Maple 2017. This is just how I want it.

If the actual value is 1.23456789, the interface(displayprecision=4) makes it diplay 1.235 in Maple 2017. Again, this is perfect, just how I (and most engineers) like it.

Now I have installed Maple 2018 and now interface(displayprecision=4) means 4 decimal points rather than significant digits.

So:

123.456789 => 123.4568 in Maple 2018

1.23456789 => 1.2346  in Maple 2018

This is NOT what I want.

Digits or, say, evalf[4] will not work as a fix, as I only want the DISPLAYED value to have 4 significant digits, I want the entire value used in calculations.

I am told (by Carl Love, thank you Carl) that displayprecision=4 means 4 decimal points in most versions of Maple, but I do need 4 significant digits.

Is there a fix in Maple 2018? Something that will make all output values display with 4 significant digits?

I am considering re-installing Maple 2017 and reverting to it, it turns out to be a huge work to format each output value.

I hope someone can help me, thank you in advance.

Regards, raskr

 

 

 

I am trying to evaluate some functions when u=v so function goes to 0/0

Example given below of the expansion series I need to produce first. But I can't produce it.
 

restart

"How do I get this expansion and sum"?""

````

``

eq := (u^m-v^m)/(u-v)

(u^m-v^m)/(u-v)

(1)

eval(eq, u = v)

Error, numeric exception: division by zero

 

``

eq1 := convert(eq, Sum, method = rational, include = powers)

(Sum((1-u)^_k1*binomial(-m+_k1-1, _k1), _k1 = 0 .. m)-(Sum((1-v)^_k1*binomial(-m+_k1-1, _k1), _k1 = 0 .. m)))*(Sum((-1)^_k1*(-1+u-v)^_k1, _k1 = 0 .. infinity))

(2)

"(=)"

-(Sum((-1)^_k1*(-1+u-v)^_k1, _k1 = 0 .. infinity))*m*(Sum((1-u)^_k1*binomial(-m+_k1, _k1)/(-m+_k1), _k1 = 0 .. m))+(Sum((-1)^_k1*(-1+u-v)^_k1, _k1 = 0 .. infinity))*m*(Sum((1-v)^_k1*binomial(-m+_k1, _k1)/(-m+_k1), _k1 = 0 .. m))

(3)

"(=)"

-(Sum((-1)^_k1*(-1+u-v)^_k1, _k1 = 0 .. infinity))*m*(Sum((1-u)^_k1*binomial(-m+_k1, _k1)/(-m+_k1), _k1 = 0 .. m))+(Sum((-1)^_k1*(-1+u-v)^_k1, _k1 = 0 .. infinity))*m*(Sum((1-v)^_k1*binomial(-m+_k1, _k1)/(-m+_k1), _k1 = 0 .. m))

(4)

eval(eq1, u = v)

0

(5)

for m to 5 do m, "   ", simplify(eq); eval(simplify(eq), u = v) end do

5*v^4

(6)

unassign('m')

``eq2 := sum(u^(m-1-i)*v^i, i = 0 .. m-1)

-u^(m-1)*(v/u)^m*u/(u-v)+u^(m-1)*u/(u-v)

(7)

"(=)"

-u^m*((v/u)^m-1)/(u-v)

(8)

eval(eq2, u = v)

Error, numeric exception: division by zero

 

``

``

u := v

v

(9)

eq3 := sum(u^(m-1-i)*v^i, i = 0 .. m-1)

v^m*m/v

(10)

"(=)"

v^(m-1)*m

(11)

``


 

Download Convert_to_Sum.mw

Hello

I'd like Maple to return ln(abs(x)) for int(1/x,x) instead of ln(x).

I tried convert MMA code,but I failed.

realIntegrate[f_, x_Symbol] := 
 Simplify[Integrate[f, x] /. Log[expr_] :> Log[Abs[expr]], 
  x \[Element] Reals]; Unprotect[Integrate]; 
Integrate[f_, x_Symbol] /; ! TrueQ[$flag] := 
 Block[{$flag = True}, realIntegrate[f, x]]; Protect[Integrate];

My maple code works only for very simple cases.

REALINT := proc (f, x)

if typematch(int(f, x), ln(y::anything), 's') then

`assuming`([simplify(ln(abs(rhs(s[1]))))], [x in real])

else int(f, x)

end if

end proc;

REALINT(1/x, x);

#ln(abs(x))

REALINT(1/(x+1), x);

#ln(abs(x+1))

REALINT(1/x+1, x);

#x+ln(x) dosen't work.

 

Thanks.

I am using Scientific notations and it constatly reminds me of the units and conversion challenges of using Maple.  I am using 2018 and am an engineer where units are our life blood for calculations.

 

Ive attached the file in ref where the constants shows J/Kg-mol   but outputs in a converted base unit of m^2 kg / s^2 mol K.  This modifies the value normally used by tables or other references as verification (often without units except in a column header)

 

The real problem is without units the caculated value 34.52 (or 0.03452) is meaningless when the real value has to be 287.05 if used without units or has correction applied within the SW internally.   

Units is my singular frustration with Maple as a really useful tool.  2018 moved this forward in so many ways which is very benficial.  I am really wondering if it may be how I'm setting the session up, or it is what it is.

Units_conversion_issue.mw

 

Hello,

I have an implicit function and I have plotted the graph of the same in maple 18 worksheet. Now I would like to export the data of the same graph into an excel file so that I can use it further. Kindly provide the solution and if some kind of example is provided I'll be highly grateful to you.

 

Thanks in advance

 

Hello people in mapleprimes,

I installed maple 2018 Japanese version.
And, with solve(x^2-1,x), its solution is expressed as _EXPSEQ(1, -1)

I know this expression is an internal represantation.
How can I have maple answer as 1, -1?

Thanks in advance.

Addition: my pc is mac osx 10.13.6.
 

 

 

Hello,

I'm trying to solve  inverse trigonometric equation:

EQ := sqrt(3)*arctan(x/sqrt(3))-arctan(x) = 1;

sol := solve(EQ, {x});

#sol := {x = sqrt(3)*tan(RootOf(-tan(sqrt(3)*_Z-1)*sqrt(3)+3*tan(_Z)))}

evalf(sol);

#{x = 13.24164497} OK. one Real solution.

sol2 := evalf(allvalues(sol));

#sol2 := {x = -.1141310781-1.108044977*I}, {x = -.1141310781+1.108044977*I}, # {x = 1.142681884}, {x #= -2.379974990}, {x = 13.24164497}

Check:

seq(evalf(eval(EQ, sol2[k])), k = 1 .. nops([sol2]));

#.99999999991340592650+1.61960960*10^(-11)*I = 1., .99999999991340592650-#1.61960960*10^(-11)*I = 1., .15821278548775934290 = 1., -.4580182246463005988 = 1., #.9999999996233630663 = 1.

1.Can someone explain to me where did Maple find these Additional roots like: {x = 1.142681884}, {x = -2.379974990}?

2.It's a Bug or normal behavior ?

 

Hi , 

I want to ask if there is any maple code of how to construct wavelet to solve fractional differential eqautions? Or any reference may be help me 

thanks 

Hello to everyone!

 

I was trying to implement the following proc:
 

``

restart; with(plots); with(plottools)

"AngleSpectrum  :=  proc( theta )  local A, B, C, a1,a2,col,k,n;  n := floor(2*Pi/theta):  for k from 1 to n do      a1 := theta*(k-1);   a2 := theta*(k);      if( k mod 2 = 0) then col := COLOR(RGB,.8,.3,.5);      else col := COLOR(RGB,.4,.3,.5) ; fi;      A[k] := plottools[pieslice]([0,0], 1, a1..a2, color = col  ):      C[k] := textplot( [ evalf(1.2*cos(a2)), evalf(1.2*sin(a2)),                   convert(a2, string)]):  od:  display( seq( {A[k], C[k]}, k = 1..n), scaling=constrained);  end proc:"

Error, unterminated loop

"AngleSpectrum  := proc( theta )  local A, B, C, a1,a2,col,k,n;  n := floor(2*Pi/theta):  for k from 1 to n do   a1 := theta*(k-1); a2 := theta*(k);  if( k mod 2 = 0) then col := COLOR(RGB,.8,.3,.5);      else col := COLOR(RGB,.4,.3,.5) ; fi;  A[k] := plottools[pieslice]([0,0], 1, a1..a2, color = col  ):  C[k] := textplot( [ evalf(1.2*cos(a2)), evalf(1.2*sin(a2)),   convert(a2, string)]):  od:  display( seq( {A[k], C[k]}, k = 1..n), scaling=constrained);  end proc:"

 

``


Can anyone help me to figure out my mistake?

Download proc.mw

Hi,

I'm trying to solve this system of differential equation, coming from the iterative process of the Elastic Curve's  solution.

The problem is that Maple returns:

risultato12 := NULL

EDIT: i think the problem is related to the non-linear equations in the system.

Any suggestion?

Here is the file

https://1drv.ms/u/s!AuhHGe410qgOm1_PdEDqkO4J1YYp

Why does the "textplot" command not work? I just want to write
 

 

af_eq := (3*alpha[2](t[1], t[2])*A^3*(1/8)-A*sigma)^2+(1/4)*alpha[1](t[1], t[2])^2*A^2 = (1/4)*f0^2

(.9701625000*A^3-A*sigma)^2+0.1892250000e-4*A^2 = 0.2500000000e-2

(1)

 alpha[1]:=0.0087;alpha[2]:=2.5871;f0:=f[0]

0.87e-2

 

2.5871

 

f[0]

(2)

 

with(plots, implicitplot,implicitplot3d):

 f0 :=0.1; alpha[1]:=0.0087;alpha[2]:=2.5871;

.1

 

0.87e-2

 

2.5871

(3)

p1:=implicitplot(af_eq, sigma = -1.2 .. 2, A = 0 .. 2,  numpoints = 20000, axes = box, axesfont=[SYMBOL, 14],labels = [sigma, A], labelfont = [SYMBOL, 16],color="Red",tickmarks=[9,12],thickness=2);

 

 

t11 := textplot([-.5, 1, ('typeset')("Peak ")])

t22 := textplot([-.5, 1.2, ('typeset')("Lower ")])

display({p1, t11, t22}, 'view' = [-1.2 .. 2, 0 .. 2])