Maple 2016 Questions and Posts

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

Hello People in mapleprimes,

I have a question about collecting part of expression.
Please teach me an answer to this.

I want to modify a1 to b1.


e3.mw

Thanks in advance.

For a 2D parametric plot with only one parameter, in Maple we use plot([x,y,range]) but what about the case x and y are expressed by more than one parameter? How should I assign the range? For example I tried the following one

h := k[1]*k[3]+k[1]*k[4]+k[2]*k[4]:
x := k[2]/h:
y := (k[3]+k[4])/h:
A := seq(k[i] = 1 .. 2, i = 1 .. 4):
plot([x, y, A]);

But then I encountered the following error:
Error, (in plot) incorrect first argument [k[2]/(k[1]*k[3]+k[1]*k[4]+k[2]*k[4]), (k[3]+k[4])/(k[1]*k[3]+k[1]*k[4]+k[2]*k[4]), k[1] = 0.1e-2 .. 1000, k[2] = 0.1e-2 .. 1000, k[3] = 0.1e-2 .. 1000, k[4] = 0.1e-2 .. 1000]

For one parameter the above method doesn't make an error like the following:

x := t+1:
y := t^2:
A := t = 1 .. 2:
plot([x, y, A]);

So for more than one parameter, there should be another way to ask the plot. Does anyone know how to do that?

Try this command.

display(semitorus([0, 0, 0], 0 .. Pi, 1, 2), lightmodel = light4, orientation = [-140, 60], scaling = constrained, style = patchnogrid)

I get this mess. The picture on the help page doesn't look any better.Setting the range 0..2 Pi looks fine though. So I think it is a bug.

What I was trying to do is plot 3/4 of a torus i.e circle disk swept in 3/4 of a carcle with capped ends. What is a good way?

Hi all,

I am working on a Maple file to find the right force excerted in a specifik angle (theta). This is the script Maple than has to work out:

 

eq4 := Fh1 = (1/2)*(solFh2*sqrt(2)-40)/sin(theta);
eq5 := Fh1 = (1/2)*(solFh2*sqrt(2)-100)/cos(theta);
sol := solve({eq4, eq5}, {Fh1, theta});

Next it gives me the answers as following:

sol := {Fh1 = 121.6477702, theta = .9606764638}, {Fh1 = -121.6477702, theta = -2.180916190}

Which is correct: I get a force (Fh1 = ± 121.6477...) with 2 angles (theta = .9696... or theta=-2.1809...)

 

If i want to continue working with Fh1 it gives an error saying it has 2 values for it (obviously a positive and a negative value). Is there a way to continue working with the positive values of Fh1 and theta?

 

I was thinking of solving the intersect equation on the positive 'theta'-axis in a form like:

 

sol := solve({eq4, eq5}, {Fh1, theta>0}); as theta is my horizontal axis and a positve theta gives me a positive Fh1 but Maple doesn't work that straightforward. 

 

Thanks a lot!

Hi I was wondering if you can help me with some maple commands about using Euler's method. My professor created a tutorial on using some commands to calculate the value via Euler's method. 

Her commands in the tutorial for using Euler's method  for a differential equation- dy/dx= x+y   y(0)=1

x0:=0:y0:=1:xf:=1:n:=10:

h:=evalf((xf-x0)/n);

f:=(x,y) -> x+y

x:=x0:y:=y0:

This next step confuses me the most, my professor uses this syntax to compute the values of approximation via Euler's method. N represents the number of pieces we want to approximate the value with. X0 is initial and XF is final. 

forifrom1tondo k:=f(x,y):y:=y+h*k:x:=x+h:print(x,y):od:

I tried replicating this syntax on the exact same problem, copying the syntax commands word for word. Yet, I keep getting the same error "unable to parce" error, with the "od" being highlighted. But on her tutorial, it gave her an two columns with the intervals (n) and all it's values. She even did the same did for only wanting 1 loop printed 

forifrom1tondo k:=f(x,y):y:=y+h*k:x:=x+h:od:print(x,y):.   And it gave her only 1 loop.

I tried both and still got the error. Please Help, Thanks in advance

Hey, i'm trying do demonstrate that a nonlinear system has a semistable limit cycle but i get a warning at the plot command saying "Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct" and i dont understand it. So i wonder if someone here could help me? 

 

restart; with(PDEtools); with(plots);
eq1 := diff(x(t), t) = x(t)*(x(t)^2+y(t)^2-1)^2-y(t);
                                             2       
           d              /    2       2    \        
          --- x(t) = x(t) \x(t)  + y(t)  - 1/  - y(t)
           dt                                        
eq2 := diff(y(t), t) = y(t)*(x(t)^2+y(t)^2-1)^2+x(t);
                                             2       
           d              /    2       2    \        
          --- y(t) = y(t) \x(t)  + y(t)  - 1/  + x(t)
           dt                                        
tr := {x(t) = r(t)*cos(theta(t)), y(t) = r(t)*sin(theta(t))};
     {x(t) = r(t) cos(theta(t)), y(t) = r(t) sin(theta(t))}
eq1b := dchange(tr, x(t)*eq1+y(t)*eq2, [r(t), theta(t)], simplify);
              / d      \       2 /        4         2\
         r(t) |--- r(t)| = r(t)  \1 + r(t)  - 2 r(t) /
              \ dt     /                              
eq1b := expand(eq1b/r(t));
                d                    5         3
               --- r(t) = r(t) + r(t)  - 2 r(t) 
                dt                              
eq2b := dchange(tr, y(t)*eq1-x(t)*eq2, [r(t), theta(t)], simplify);
                      2 / d          \        2
                 -r(t)  |--- theta(t)| = -r(t) 
                        \ dt         /         
eq2b := simplify(eq2b/(-r(t)^2));
                         d              
                        --- theta(t) = 1
                         dt             
sol1 := dsolve({eq1b, r(0) = r[0]}, r(t));
          /      /  /     2  \                 
          |      |  | r[0]   |          2     2
r(t) = exp|RootOf|ln|--------| (exp(_Z))  r[0] 
          \      \  \r[0] - 1/                 

                           2     2
   - ln(r[0] + 1) (exp(_Z))  r[0] 

       /             2\                                       
       |(exp(_Z) - 1) |          2     2            2        2
   - ln|--------------| (exp(_Z))  r[0]  + (exp(_Z))  _Z r[0] 
       \ exp(_Z) - 2  /                                       

                                /     2  \              
                2     2         | r[0]   |             2
   + 2 (exp(_Z))  r[0]  t - 2 ln|--------| exp(_Z) r[0] 
                                \r[0] - 1/              

                                2
   + 2 ln(r[0] + 1) exp(_Z) r[0] 

         /             2\                                   
         |(exp(_Z) - 1) |             2                    2
   + 2 ln|--------------| exp(_Z) r[0]  - 2 exp(_Z) _Z r[0] 
         \ exp(_Z) - 2  /                                   

                           /     2  \           
                   2       | r[0]   |          2
   - 4 exp(_Z) r[0]  t - ln|--------| (exp(_Z)) 
                           \r[0] - 1/           

                                 /             2\           
                           2     |(exp(_Z) - 1) |          2
   + ln(r[0] + 1) (exp(_Z))  + ln|--------------| (exp(_Z)) 
                                 \ exp(_Z) - 2  /           

                                          /     2  \        
              2                   2       | r[0]   |        
   - (exp(_Z))  _Z - 2 t (exp(_Z))  + 2 ln|--------| exp(_Z)
                                          \r[0] - 1/        

                                  /             2\        
                                  |(exp(_Z) - 1) |        
   - 2 ln(r[0] + 1) exp(_Z) - 2 ln|--------------| exp(_Z)
                                  \ exp(_Z) - 2  /        

              2                                    2            
   - (exp(_Z))  + 2 _Z exp(_Z) + 4 t exp(_Z) + r[0]  + 2 exp(_Z)

      \\    
      ||    
   - 1|| - 1
      //    
sol1 := simplify(sol1);
          /      /   /     2  \                
          |      |   | r[0]   |               2
r(t) = exp|RootOf|-ln|--------| exp(2 _Z) r[0] 
          \      \   \r[0] - 1/                

                                2
   + ln(r[0] + 1) exp(2 _Z) r[0] 

       /             2\                                     
       |(exp(_Z) - 1) |               2                    2
   + ln|--------------| exp(2 _Z) r[0]  - exp(2 _Z) _Z r[0] 
       \ exp(_Z) - 2  /                                     

                               /     2  \              
                     2         | r[0]   |             2
   - 2 exp(2 _Z) r[0]  t + 2 ln|--------| exp(_Z) r[0] 
                               \r[0] - 1/              

                                2
   - 2 ln(r[0] + 1) exp(_Z) r[0] 

         /             2\                                   
         |(exp(_Z) - 1) |             2                    2
   - 2 ln|--------------| exp(_Z) r[0]  + 2 exp(_Z) _Z r[0] 
         \ exp(_Z) - 2  /                                   

                           /     2  \          
                   2       | r[0]   |          
   + 4 exp(_Z) r[0]  t + ln|--------| exp(2 _Z)
                           \r[0] - 1/          

                                /             2\          
                                |(exp(_Z) - 1) |          
   - ln(r[0] + 1) exp(2 _Z) - ln|--------------| exp(2 _Z)
                                \ exp(_Z) - 2  /          

                                        /     2  \        
                                        | r[0]   |        
   + exp(2 _Z) _Z + 2 t exp(2 _Z) - 2 ln|--------| exp(_Z)
                                        \r[0] - 1/        

                                  /             2\        
                                  |(exp(_Z) - 1) |        
   + 2 ln(r[0] + 1) exp(_Z) + 2 ln|--------------| exp(_Z)
                                  \ exp(_Z) - 2  /        

                                                  2            
   + exp(2 _Z) - 2 _Z exp(_Z) - 4 t exp(_Z) - r[0]  - 2 exp(_Z)

      \\    
      ||    
   + 1|| - 1
      //    
sol2 := dsolve({eq2b, theta(0) = theta[0]}, theta(t));
                    theta(t) = t + theta[0]
theta[0] := (1/4)*Pi;
                              1   
                              - Pi
                              4   
plot1 := polarplot([subs(r[0] = .1, rhs(sol1)), rhs(sol2), t = 0 .. 10], color = red);
Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct
plot2 := polarplot([subs(r[0] = 2, rhs(sol1)), rhs(sol2), t = 0 .. 10], color = blue);
Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct
display({plot1, plot2}, scaling = constrained, tickmarks = [4, 3], view = [-2 .. 2, -2 .. 2]);

I am tying to compute the wronskian of a fourth order DE: y=C1e2x+ C2e-x +C3xe-x+ C4x2e-x Here's what I did:

with(VectorCalculus):
with(LinearAlgebra):

Determinant(Wronskian([e^(2*x), e^(-x), xe^(-x), x^2*e^(-x)], x)):

which gave nothing.
Can anyone please help?

Thanks in advance,

AJ

Hi, there!

I try to simplify the next expression:

Simplify(LeviCivita[4, sigma, lambda, rho]*LeviCivita[4, xi, eta, mu]*g_[rho, mu]*qp[sigma]*q[lambda]*qp[xi]*q[eta])

Maple gives answer:

In reality it is incorrect answer, because indices must run over 1,2,3 but not 1,2,3,4!

SumOverRepeatedIndices(%) confirms that maple mistakes.

 

my preamble is:

with(Physics)

Setup(mathematicalnotation = true);
Coordinates(X);

Setup(spaceindices = lowercaselatin)

Setup(tensors = q[mu](X))

PDEtools:-declare(q(X))

Setup(tensors = qp[mu](X))

PDEtools:-declare(qp(X))

I use Ubuntu 14.04 and X, not the desktop.  I use emacs/maple 2016.

GNU Emacs 25.1.2 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
 of 2017-03-1

;;; maplev.el --- Maple mode for GNU Emacs

;; Authors:    Joseph S. Riel <joer@k-online.com>
;;             and Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
;; Time-stamp: "2003-10-09 22:49:16 joe"
;; Created:    June 1999
;; Version:    2.155
;; Keywords:   Maple, languages
;; X-URL:      http://www.k-online.com/~joer/maplev/maplev.html
;; X-RCS:      $Id: maplev.el,v 1.14 2006-06-02 14:02:38 joe Exp $

I use emacs/maple mode with maple 2016.  Quite often, emacs looses connection with the maple server.  I do  not remember this happening or maybe not as often, with earlier versions of maple.

After using maple/emacs, I started xmaple.  After a few expression evaluations, the maple server stopped.  Restarting xmaple and repeating the expression evaluations many times, I do not get the crash.  So, this appears to be a difficulty with external connections to the maple server.

Does a later version of maple mode exist?

 

I expected plot with an undefined name to do nothing, but,

plot(asdf);

actually plots y=x!

When I right click on an expression, I only some times get the context menu (under Maple 2016 in document mode, in Win 10).

Any suggestions - Anyone else having this problem? - I know how to use the long forms, but this is for students - for a brief exposure to Maple.

hi

how i can remove this error?

thanks

Error, (in pdsolve/numeric/process_IBCs) initial/boundary conditions can only contain derivatives which are normal to the boundary, got (D[1](H))(x, 0)
 

RR-steady.mw


 

 

"restart;beta:=1:k:=2:L:=1: W(t):=(Heaviside(t-1)-Heaviside(t-1.1)); theta:=3:   hR:=1 :hD(x):=hR+tan(theta)*(L-x) :W0:=2: f(x):=sqrt((hR^(2)+(W0)/(k)*(L^(2)-x^(2)))):t:=5:M:=2:theta:=20:"

proc (t) options operator, arrow; Heaviside(t-1)-Heaviside(t-1.1) end proc

(1)

PDE1 := diff(H(x, y), x, x)+diff(H(x, y), y, y)+2*W(t)/k = 0

diff(diff(H(x, y), x), x)+diff(diff(H(x, y), y), y) = 0

(2)

bcs1 := {H(L, y) = hR^2, (D[1](H))(0, y) = 0};

{H(1, y) = 1, (D[1](H))(0, y) = 0}

(3)

bcs2 := {H(x, M) = hD(x)^2, (D[1](H))(x, 0) = 0}

{H(x, 2) = (1+tan(20)*(1-x))^2, (D[1](H))(x, 0) = 0}

(4)

pdsolve(PDE1, `union`(bcs1, bcs2), numeric)

Error, (in pdsolve/numeric/process_IBCs) initial/boundary conditions can only contain derivatives which are normal to the boundary, got (D[1](H))(x, 0)

 

``


 

Download RR-steady.mw

Hello,

I'm trying to send data from Excel to Maple through Excel Add-in.

However, in Excel,  I can only create variables. I want to send these variables to Maple and access them in Maple.

I want to know how to send variables from Excel to Maple.

I look forward your tips.

Thank you!

Hi, I have a procedure written on several lines on a worskheet in 2D. When I type shift+enter to insert a blank line at some place of the procedure, the blank line does not appear at the cursor, but at the end of the procedure.
This is annoying since I cannot add a line to make "readable" modifications in the procedure !


I am on LInux Fedora 26. Many thanks.

Hi all,

I'am new to Maple and have some very basic questions. Maple can figure out that the exponential is positive.

> is(exp(x)>0) assuming x::real;
                                     true

But it cannot figure out that a sum of exponentials is positive too:

> is(sum(exp(x*i),i=1..N)>0) assuming x::real,N::integer,N>1;
                                     FAIL

What am I doing wrong? Moreover, what's wrong with this statement:

> is(ln(a+b)-ln(a)=ln(1-b/a)) assuming a::real,b::real,a>0,b>0,b<a;
                                     FAIL

Finally, is there a way to declare a generic fuction f and assume that its image is always a positive real?

Thanks

Nico 

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