Maple 2017 Questions and Posts

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

Why does this code return NULL? Which, earlier than 2017 version of Maple differs? What other Maple function could be used in place of eliminate for the general case?

 

eliminate({x[5] = x[2] / x[1], x[6] = x[3] / x[2], x[7] = x[1] / x[4], x[8] = (2 * x[2] + x[4]) / (2 * x[1] + x[3] + x[4])}, {x[1], x[2], x[3], x[4], x[8]});

 

Hello,

How can i solve this integro-PDE(partial diffrential equation)??

regards...

eq := (1+6*(l/h)^2/(1+nu))*(diff(u(xi, tau), xi, xi, xi, xi)+int(-B*lambda*exp(-lambda(tau-s))*(diff(u(xi, s), xi, xi, xi, xi)), s = 0 .. tau))+diff(u(xi, tau), tau, tau) = alpha*(int((diff(u(xi, tau), xi))^2, xi = 0 .. 1)+int(-B*lambda*exp(-lambda(tau-s))*(int((diff(u(xi, tau), xi))^2, xi = 0 .. 1)), s = 0 .. tau))*(diff(u(xi, tau), xi, xi))+V^2*(sum(j*u(xi, tau)^(j-1), j = 1 .. 8))

jing-Fu.mw

Hello

Equal_products_16.mw

I think this code was written (Joe Riel/C.Love) on Maple 16 platform back in 2013, but I want it to work in my currrent version.

I think I had to set up a compiler, which was a bit of an ordeal.

compiler setup?

I have installed MS Visual Studio. 

Now in Maple I try:

>Compiler:-Setup()

i put vcvars64.bat and vcvarsx86_amd64.bat (from Microsoft Visual Studio folder) in my C:\Program Files\Maple 2017\bin.X86_64_WINDOWS and locate them

I get error

Error, (in Compiler:-Setup) unable to write to initialization file, C:\Program Files\Maple 2017\bin.X86_64_WINDOWS/launch.ini, possibly due to insufficient permissions
 

@

Everytime I try to save Maple 2017 on my Windows 10 computer crashes. With this bug I cannot save anything. I have tried reinstalling maple but nothing changes.

Note this is not a maple autosave issue as I have disabled it.

I have a function inside a file called proc2.mpl

When I read the file from a worksheet using the command read("proc2.mpl"); I see warning messages

Warning, incomplete string;  use " to end the string
Warning, incomplete string;  use " to end the string

printed on the screen.  Now if I copy the same exact code and past it into the worksheet and invoke the function, I see no warning messages.

Why is that? Here is the content of "proc2.mpl"

process_file := proc()
  local str,fileName;


  fileName := "output.txt";
  
  str:="
   \\begin{align*}
     A =& B  \\\\ 
       =& 3
   \\end{align*}
  ";
	
  writebytes(fileName, str);
  close(fileName);

end proc:

Here is screen shot loading the function from worksheet

But now when I call it using process_file(); it works as expected.

Now here is screen shot with same code inside the worksheet itself. No warning messages show up when I call it.

And the above call also works as expected.

So I am now ignoring these warning messages since I also do not know what causes them.

Any ideas why they show up when the code is inside a .mpl file and not in the work sheet?

Maple 2017.3 on windows.

 

 

 

I want to save multiline string to a file. I am not sure Maple likes my string. Also when I look at the textfile after writing the string to it, the string does not look like what is expected. I given small example

First, created a "proc.mpl" in the folder. Here is the content of "proc.mpl"

process_file := proc()
local str;
  
str:="
   \\begin{align*}
     A =& B \\\\
       =& 3
   \\end{align*}
";

FileTools[Text][WriteString]("output.txt", str);
FileTools[Text][Close]("output.txt");

end proc:

Then opened Maple, and from a worksheet, called the above proc() like this

restart;
currentdir("C:\\where_the_file_is");
read("proc.mpl");
Warning, incomplete string;  use " to end the string
Warning, incomplete string;  use " to end the string
Warning, incomplete string;  use " to end the string
process_file();

You see these warnings there. So how does one make a multiline string in Maple? Please tell me it is possible. Else this whole process will not work.

When I look at the "output.txt", where the string is written, this is what shows


   \begin{align*}
     A =& B \      =& 3
   \end{align*}

Which is wrong, I expected this


   \begin{align*}
     A =& B \\     
        =& 3
   \end{align*}

 

I use \ to escape each \, since this is Latex code. 

QUestions are:

1) Can one have multiline string in Maple? as in

"
line one
line two
"

With implied carriage return, just as it appears in the input?  I do this all the time in Mathematica.

2) Is something wrong with how I am saving the string to the file?
 

On a side note: I noticed I had to close the textfile to see the output in it. It looks like FileTools[Text][WriteString] does not flush the string autmatically to a otuput file after each write() which is a little annoying.

Using Maple 2017.3 on windows.

This is how the above is done in Mathematica

And this is "test.txt" which shows the output as expected

   \begin{align*}
     A =& B \\
       =& 3
   \end{align*}

I'd like to do the same in Maple.

Hi all!
I'm totally new using Maple (just installed right now) and need to solve this ODE using Runge-Kutta 4th order scheme. I found there's an inbuilt function for it but I just don't know how to use it.

Can anyone please help me out with this? I'm a bit in a rush and don't have too much time for trial and errors approach.

Much appreciate any help.

Hi 

I need yours help to solve the given integral 
 

restart

A = 3*(q-1)^(-1/(1+r))*GAMMA(q-3/(2+2*r))*GAMMA(3/(2+2*r))/(GAMMA(5/(2+2*r))*GAMMA(q-5/(2+2*r)));

g := int(`ε`*(1+(`ε`/(A*t))^(1+r)/(q-1))^(-q)*c*exp(-`ε`/a), `ε` = 0 .. infinity);

``

NULL

NULL

q,c,a and r are parameters.
Γ is a gamma function.

Download Karim.mw
 

 

 


I have a difficult problem by NLPSolve & mnimize (optimization)

How do I solve the erroe"unexpected parameters" in Maple?

The code is uploade under the line.
Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/example1.mw .

Download example1.mw

For most expressions e, op(0,e) gives the type, e.g. this works if e is of type string, list, set, Array, Vector, Matrix, '+', etc. This is not the case for procedure calls and indexed expressions, but these differences make sense. However, there are other puzzling differences, at least in Maple 2017.2, for which I can see no rationale.

Specifically, if e is a numeric type such as integer, float, or fraction, complex, then op(0,e) returns the capitalized version of the type, e.g. Integer. Note also that type(e,Integer) will generate an error message saying that type 'Integer' does not exist.

A Google search shows that in an old programming guide for Maple (Release V, p.135; copyright 1998), op(0,x) is "integer" if x is an integer, whereas in a more recent programming guide (the 2009 introductory one, p.53), it is capitalized, consistent with the behaviour in Maple 2017.

I do not understand why this change was made. Can anybody shed light on the situation?

hello

How I can remove these errors?

Thanks

erorr.mw
 

NULL

 

 

restart; eq31g := diff(u(t), `$`(t, 2))+u(t)+mu[s]*(diff(u(t), t))^3 = (1-mu[s])*(diff(u(t), t))*(diff(u(t), `$`(t, 2)))

diff(diff(u(t), t), t)+u(t)+mu[s]*(diff(u(t), t))^3 = (1-mu[s])*(diff(u(t), t))*(diff(diff(u(t), t), t))

(1.1)

 

 

 

eq33a:=subs(t=tau/omega,value(subs(u(t)=u(omega*t),eq31g)));

diff(diff(u(tau), tau/omega), tau/omega)+u(tau)+mu[s]*(diff(u(tau), tau/omega))^3 = (1-mu[s])*(diff(u(tau), tau/omega))*(diff(diff(u(tau), tau/omega), tau/omega))

(2.1)

omgRule:=omega=1+add(epsilon^i*omega[i],i=1..2);

omega = epsilon^2*omega[2]+epsilon*omega[1]+1

(2.2)

uExpRule:=u(tau)=add(epsilon^i*u[i](tau),i=1..3);

u(tau) = epsilon*u[1](tau)+epsilon^2*u[2](tau)+epsilon^3*u[3](tau)

(2.3)

temp:=subs(uExpRule,omgRule,convert(eq33a,diff));

Error, invalid input: diff received tau/omega, which is not valid for its 2nd argument

 

eq33b:=convert(series(lhs(temp),epsilon,4),polynom)=0;

Error, invalid input: lhs received temp, which is not valid for its 1st argument, expr

 

eqEps:=seq(coeff(lhs(eq33b),epsilon,i)=0,i=1..3);

Error, invalid input: lhs received eq33b, which is not valid for its 1st argument, expr

 

The general solution of the first-order equation, eqEps[1], can be expressed as

sol1:=dsolve({eqEps[1],u[1](0)=a,D(u[1])(0)=0},u[1](tau));

Error, (in dsolve) not a system with respect to the unknowns [u[1](tau)]

 

eq33c:=subs(u[1]=u[2],lhs(eqEps[1])=lhs(eqEps[1]))-subs(sol1,0=lhs(eqEps[2]));

Error, invalid input: lhs received eqEps[1], which is not valid for its 1st argument, expr

 

Expanding the right-hand side of eq33c in a Fourier series using trigonometric identities yields

eq33c_RHS:=combine(rhs(eq33c));

Error, invalid input: rhs received eq33c, which is not valid for its 1st argument, expr

 

Eliminating the terms,  and , demands that . Then, the particular solution of eq33c can be expressed as

sol2:=combine(subs(_C1=0,_C2=0,dsolve(subs(omega[1]=0,eq33c),u[2](tau))));

Error, (in dsolve) expecting an ODE or a set or list of ODEs. Received eq33c

 

Substituting sol1 and sol2 into the third-order equation, eqEps[3], and using the fact that , we obtain

eq33d:=subs(u[1]=u[3],lhs(eqEps[1])=lhs(eqEps[1]))-subs(sol1,sol2,omega[1]=0,0=lhs(eqEps[3]));

Error, invalid input: lhs received eqEps[1], which is not valid for its 1st argument, expr

 

Expanding the right-hand side of eq33d in a Fourier series using trigonometric identities, we have

eq33d_RHS:=combine(rhs(eq33d));

Error, invalid input: rhs received eq33d, which is not valid for its 1st argument, expr

 

Eliminating the terms that lead to secular terms from eq33d_RHS demands that

omg2Rule:=omega[2]=solve(coeff(eq33d_RHS,cos(beta+tau)),omega[2]);

omega[2] = omega[2]

(2.4)

As discussed above, for a second-order uniform expansion, we do not need to solve for . Combining the first- and second-order solutions, we obtain, to the second approximation, that

combine(subs(sol1,sol2,uExpRule));

Error, invalid input: subs received sol1, which is not valid for its 1st argument

 

where

tau=subs(omega[1]=0,omg2Rule,subs(omgRule,omega*t));

tau = (epsilon^2*omega[2]+1)*t

(2.5)

``


 

Download erorr.mw

 

I'm a brand-new Maple user, so be gentle!

I was fooling around with a document and manually changed some fonts on various items, by just highlighting them and setting a new font.  I even selected everything and changed the font but not the size.  I didn't actually change any styles. 

I want to reset to the Maple default now, but can't seem to do it.  Format / Manage Style Sets... / Default Maple Style Set / OK doesn't do it, neither does Format / Manage Style Sets... / Load Style Set... navigating to the default stylesets\WorksheetDefault.mw and OK / OK.  Nothing seems to change.  I've been through Help:worksheet/documenting/styles and the verbiage doesn't match the dialog box screen shots there.  I'm not really sure what to do with that "help".

I can't seem to switch to a customized style set either.  If you manually change fonts, does that supercede the style?  Is there any way to revert?

Thanks for any help!

This behavior seems rather odd.  Is it documented anywhere?

v := <a,b>;

_rtable[18446883876157227486]

 

a := 3: b := 4:

v;

_rtable[18446883876157227486]

 

convert(v, list);

[a, b]

 

I expected that final result to be [3,4].  Why is it [a,b]?

I know that I can do eval(convert(v, list)) to get the numerical value, but why is the eval necessary?

 

Hello,

I think its a simple question and I hope, someone can help me. For Example:

I have a list of numbers ("M") and I want to write these numbers in a new List but with the restriction

if x<Mthen Mi*2
else Mi 

Can someone explain how to solve this in maple?

Thank you very much.
Maritn

 

First 20 21 22 23 24 25 26 Last Page 22 of 40