Maple 2019 Questions and Posts

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

Hi all;

I hope all is well with you.

I am regular user of Maple for 7 years. I just reinstalled it to a new version, Maple 2019.

After installation, which was very smooth and without any unexpected problem, I opened a new document and entered a simple task; “sqrt(4);” the answer was

1.81847767202745*10^(-58) + (7.53238114626421*10^(-59))*I

I am pretty sure that I am missing something. The answer is obviously incorrect and there is a problem, but where.

I would be thankful if someone could help me with this issue.

Best

Farzad

 

Hi all,

I'm using dsolve (numeric) for a system of ODE with initial conditions.

Is it possible to show (at the same time with solving) the values of time and an unknown when solving a system of ODE before the end of calculation. Of course, the calculation time is high and I want to know before the calculation is finished if the solution is converging.

Also, I use the option range in my calculations from 0 to 200s (seconds) and more. I do'nt know how I can speed up the solution with less memory.

Please find in the attached file an example.

dsolve1_1r.mw

Thank you in advance for your help.

Hi folks!

Is there any way to make this kind of derivative?

If necessary, I can provide the original file here.

Thanks in advance for any help!

choosing lightmodel=none and shading=none, produces a dark grey grided surface
plot3d(x*y, x = 0 .. 10, y = 0 .. 10, lightmodel = none, shading = none)

adding the style=wireframe option gives a blank plot.  Grid probably white?  Changing style to patchnogrid the surface is indeed white. However chosing both shading and style options to none regardless of the lightmodel will produce a plot that appears empty.  Is this to be expected?

However, just the style=wireframe option produces a colored grided wireframe as to expect
plot3d(x*y, x = 0 .. 10, y = 0 .. 10, lightmodel = none, style = wireframe)

Projection will not work with orientation. 

plot3d(x*y, x = 0 .. 10, y = 0 .. 10, projection = 0.2)
                                                        

plot3d(x*y, x = 0 .. 10, y = 0 .. 10, projection = 0.2, orientation = [55, 75, 0])
                                                

Hello colleagues,

I would like to get a suggestion on how to utilize an existing `simplify` function or to define an operator, which allows the following simplification:

O(x^n)/x = O(x^(n - 1))

— Alexander

Dear MaplePrimes community,

I am currently struggling to use the simplify-command in my toolbox for symbolic generation of robot dynamics.

I created a procedure which calls the simplify command with some extra checks. There are symbolic expressions in the term to be simplified that also occur in the workspace of the worksheet calling the procedure.

The simplify command (called from within the procedure) shall regard them as symbolic expressions unaware of the content of the variable in the workspace. Nevertheless, the simplifications are performed with the global variables, even though they are declared local to the procedure.

Minimal example: The variable "l1" stands for "length 1" in a mechanic problem as well as "length of the expression"

restart:
with(LinearAlgebra): with(ArrayTools): with(codegen): with(CodeGeneration): with(StringTools):
read proc_simplify2:
T := m2*(l1+l2)*(qD2)^2: # dummy-expression for kinetic energy
l1 := length(T);
T_simpl := simplify2(T):
l2 := length(T_simpl);

Code for the file proc_simplify2:

simplify2 := proc (Term)
  # Simplify a term. Additionally check if the simplification is advantageous.
  # In some cases the term gets longer after the simplification. Then discard.
  # Give the local procedure variable a long name. They must not be identical in Term.
  local simplify_tmpvar_c1, simplify_tmpvar_c1sum, simplify_tmpvar_c2, \
        simplify_tmpvar_c2sum, simplify_tmpvar_nms, simplify_tmpvar_k, Term2:
  # Assume all contents of the Term to be local variables to this procedure
  # Otherwise, variables like "l1" can be overwritten by occurences in the calling worksheet.
  simplify_tmpvar_nms:=convert(indets(Term,name),list): # get list of symbols
  for simplify_tmpvar_k from 1 to ColumnDimension(simplify_tmpvar_nms) do
    if simplify_tmpvar_nms[simplify_tmpvar_k] = Pi or simplify_tmpvar_nms[simplify_tmpvar_k] = 0 then
      next: # 0 and Pi can not be variables
    end if:
    eval(sprintf("local %s;", String(simplify_tmpvar_nms[simplify_tmpvar_k]))); # assume local
   end do:

  # Get computational effort before simplification
  simplify_tmpvar_c1:=add(cost~(Term)): 
  simplify_tmpvar_c1sum := diff(simplify_tmpvar_c1,functions)+ \
                           diff(simplify_tmpvar_c1,additions)+ \
                           diff(simplify_tmpvar_c1,multiplications)+\
                           diff(simplify_tmpvar_c1,divisions):
  # Perform simplification. Attention: tries to use global variables to simplify the expression (see above)
  Term2 := simplify(Term):
  # Get effort after simplification
  simplify_tmpvar_c2:=add(cost~(Term2)): 
  simplify_tmpvar_c2sum := diff(simplify_tmpvar_c2,functions)+\
                           diff(simplify_tmpvar_c2,additions)+\
                           diff(simplify_tmpvar_c2,multiplications)+\
                           diff(simplify_tmpvar_c2,divisions):
  if simplify_tmpvar_c2sum > simplify_tmpvar_c1sum then
    # The simplification was not successful. Take old version.
    Term2 := Term:
  end if:
  return Term2:
end proc:

I would be glad for suggestions how to define the symbolic expressions in Term as local to the procedure or perhaps a better way to perform simplifications. As my program extends over several worksheets and the user may define an input file, I would not like to have to control all names of temporary variables that may occur at some point in the project. Until I tried to use the simplify-command, there was no problem regarding variable names. Is it perhaps possible that the variables are now only declared local in the for loop and not in the procedure?

I am newcommer in Maple. I am using Maple 2019. Just a simple question;

solve(x^2-3*x+4=0, x);

gives

1.50000000000000 + (9.09238836013723*10^(-59))*I, 1.50000000000000 - (9.09238836013723*10^(-59))*I

instead I need to show in the forms of radiacal. I have also the problem in dsolve command;

dsolve(2*diff(y(x),x$2)+3*diff(y(x),x)+4*y(x),y(x));

with the result

y(x) = (2.73949338633639*10^(-116) + (2.73949338633639*10^(-116))*I)*_C1 + (1. + (2.73949338633639*10^(-116))*I)*_C2

Thanks indeed in advance

Sayed

Hi.

I'm working on an electronics project currently. In that project I have been trying to solve a system of inequalities, as shown by the picture from Maple below:

restart;

R__1 := 1;
lign1 := V__i/(R__4*(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4)) = C*(k__1 - R/R__C + R);
lign2 := V__i*(1/R__1 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__2 - R/R__C + R);
lign3 := V__i*(1/R__2 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__3 - R/R__C + R);
lign4 := V__i*(1/R__3 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__4 - R/R__C + R);
lign5 := V__i*(1/R__1 + 1/R__2 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__5 - R/R__C + R);
lign6 := V__i*(1/R__1 + 1/R__3 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__6 - R/R__C + R);
lign7 := V__i*(1/R__2 + 1/R__3 + 1/R__4)/(1/R__1 + 1/R__2 + 1/R__3 + 1/R__4) = C*(k__7 - R/R__C + R);
solve({lign1, lign2, lign3, lign4, lign5, lign6, lign7}, [R__4, R__2, R__3, R__C, R, C, V__i]);

Here's a picture as well:

However, the solution is simply that V_i = 0 and C=0, which is not really helping me. Am I doing something wrong here or is my system of equalities simply unsolvabe?

 

Hi all,

For some range of my model parameter, the numerical integration fails to give a numerical answer rather a symbolic expression. Any idea why?

Please see this attached.NumericInt.mw.

Hi, 

I'm pretty new to Maple and am currently trying to figure out this error I have. I tried to load this package http://www.math.lsa.umich.edu/~jrs/software/SF2.4v.txt via the command: 

read "//Users//boe//Desktop//Maple//MapleFiles//SF.txt"; 

however, I got "Warning, `SF` is implicitly declared local to procedure" in return. I also couldn't call any function defined in the package after running the command (I assume it's because of the local to procedure thing). I looked into the source code, and IF I understand correctly, SF is only used as the name of the package and in the line "SF:=table():". I tried modifying to "global SF:=table():", but it doesn't seem to help. 

I have a friend who ran the same command (with the modification to the reading path) with the original source file, but he had no issue using the package. The only difference is that I'm using Maple 2019 while he's using some older version, so I'm assuming version difference is the cause. (or maybe there's some setting to my maple I need to do?)

Any help would be greatly appreciated!

Hi, after solving an equation and inserting it in the original equation the result is not equal to zero!!

What is the problem?

in the attached file below I obtained 'q' and then I put it in the eq (3), but the result is not zero!!

Please help me.

555.mw

I keep getting this datatype float[8] error, can some1 please help me. 
upload the mw file here faq.mw

Also i have a working for lopp and want to make a procedure. 
Any suggestions will be helpful as well. Thanks.

This is a given set of equations (from a classifier problem in deep learning):

I tried to replicate the expression in Maple, but it was unsuccessful. 

Q_MaplePrime20200417.mw

Would you tell me how to make it work?

Then, please let me know how to refer to a previous result (equation number) in the current expression. 

The last line above (and the attached Maple document) shows my attempt, It did not work. 

Thank you/Be healthy!

 

 

Hi,

I am using Direct Search Optmization package for a procedure using Search command and everytime I run it it'll give me a different answer. same procedure, same code, when executed few times every time it generates a different answer. Can anyone help me with this ? 

First 19 20 21 22 23 24 25 Last Page 21 of 47