Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello people in Mapleprimes,
I haven't written in this site for a long time.

I have a question in the below program, which is to write ribbons.
For the implementation of this program, 
I wrote this.
ribbonplot5([cos, sin, cos + sin], -Pi .. Pi,numpoints=20);

In the part of pattern matching, as -Pi .. Pi above is a range, so it is OK.
But, when I changed this part to x=-Pi..Pi, an error message appears.

ribbonplot5([cos, sin, cos + sin],x=-Pi .. Pi,numpoints=20);

brings error messages:
"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"

In the code of ribbonplot5,  x=-Pi..Pi which is the type of name=range shoud satisfy the pattern matching, as I wrote in the first part of the program as 
ribbonplot5 := proc(Flist, r1::{range,name=range})

I cannot know why the part of the program:
 
" else
       newFlist := map(unapply, Flist, lhs(r1));
     opts := ['labels'=[lhs(r1), " "," "],
                 args[3 .. nargs]];
    ribbonplot5(newFlist,rhs(r1),op(opts)):
"

wouldn't work well.

I wish I could get an answer to this. 

Thanks in advance.

This is a program in maple9 Advanced Programming Gude p. 253

graphic_ribbonplot.mw

restart;
extend := proc(f)
     local x, y;
     unapply(f(x), x, y);
end proc:
p:=x->cos(2*x):
q:=extend(p);


ribbonplot5 := proc(Flist, r1::{range,name=range})
     local i, m, p, n, opts,newFlist;
     opts := [args[3 .. nargs]];
     if type(r1, range) then
         if not hasoption(opts, 'numpoints', 'n', 'opts')
         then n := 25
         end if; 
         m := nops(Flist);
         p := seq(plot3d(extend(Flist[i]), r1, (i-1) .. i,
                                  grid=[n, 2], op(opts)),
                       i = 1 .. m):
         plots[display](p):
     else
       newFlist := map(unapply, Flist, lhs(r1));
     opts := ['labels'=[lhs(r1), " "," "],
                 args[3 .. nargs]];
    ribbonplot5(newFlist,rhs(r1),op(opts)):
   end if:
end proc:
ribbonplot5([cos, sin, cos + sin], -Pi .. Pi,numpoints=20);

I'd like to get the simplest possible expression when using simplify. The problem is that this is all done in a program, without having the benifit of looking at the expression on the screen and trying things. So I need a method that works for large set of input all the time.

I noticed in this example that simplify did not do what I think it should have.

Given the expression -2*(x^3 + 2)/(x*(x + 1)*(sqrt(3)*I + 2*x - 1)*(sqrt(3)*I - 2*x + 1)) it can be simplified to (x^3 + 2)/(2*x^4 + 2*x) but  I had to go into many tries in order to get this final result.

Is there a better way to do this? I end up now   doing simplify(expand(numer(expr))/expand(denom(expr))) in the hope to get better simplification.  Here is an example

interface(version);

`Standard Worksheet Interface, Maple 2021.2, Windows 10, November 23 2021 Build ID 1576349`

restart;

w:=-2*(x^3+2)/x/(x+1)/(I*3^(1/2)+2*x-1)/(I*3^(1/2)-2*x+1);

-2*(x^3+2)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1))

simplify(w)

(-2*x^3-4)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1))

simplify(evalc(w))

(1/2)*(x^3+2)/((x^2-x+1)*(x+1)*x)

simplify(w) assuming x::real

(-2*x^3-4)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1))

simplify(w,size)

(-2*x^3-4)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1))

simplify(w,symbolic)

(-2*x^3-4)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1))

simplify(w,sqrt)

(-2*x^3-4)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1))

simplify(expand(numer(w))/expand(denom(w)))

(x^3+2)/(2*x^4+2*x)


It would be nice if Maple simplify would just do it directly as follows in Mathematica. May be there is a an  option I am overlooking

 

Download simplify.mw

I drew a methane molecula and display three times because I wanted to get two-fold and three-fold symmetry axis. ,I would is that I would like to get a more exact output and doing it without clicking, it's say, using code. Can someone help me?tareaclase6.mw
 

University of Costa Rica 

Course: SP-1493

Student: Lic. Marcus Vinicio Mora Salas

Instructor: Dr. Erick Castellón Elizondo

 

Assigment5

Description

 

In this assigment exercises e2.113,  e2.114, e2.115 and e2.117 was solved.

NULL

***e2.113

   

 

 

 

NULL


 

Download tareaclase6.mw

 

Suppose I have a real function which is defined on these intervals [x0,x1],...[x1,xn], and on each interval it's defined differently, for example f(x):=sqrt(x) if x>=0; f(x):=1/x if x<0.

For the last example I tried my last resort to use the assuming operator the following way:

f := ((x -> sqrt(x)) assuming (0 <= x)) or ((x -> 1/x) assuming (x < 0)) plot(f, x)

But it doesn't seem to be working, how do you propose to define this function? perhaps proc?

I tried looking for an example in maple's help, but didn't find any.

Your help is appreciated.

I read that abs(v) should find the magnitude of complex number. But I find cases where it does not.

Should one then use sqrt( Re(v)^2 + Im(v)^2 ) instead or is there different command to use?  Here is an example

interface(version)

`Standard Worksheet Interface, Maple 2021.2, Windows 10, November 23 2021 Build ID 1576349`

restart;

v:=1/16*(I*5^(1/2)+I-4*sin(1/5*Pi))*2^(3/10)*(5-5^(1/2))^(1/2)-1/8*2^(4/5)*((I*5^(1/2)+I)*sin(1/5*Pi)+1/2*5^(1/2)+3/2)

(1/16)*(I*5^(1/2)+I-4*sin((1/5)*Pi))*2^(3/10)*(5-5^(1/2))^(1/2)-(1/8)*2^(4/5)*((I*5^(1/2)+I)*sin((1/5)*Pi)+(1/2)*5^(1/2)+3/2)

abs(v)

-(1/16)*(I*5^(1/2)+I-4*sin((1/5)*Pi))*2^(3/10)*(5-5^(1/2))^(1/2)+(1/8)*2^(4/5)*((I*5^(1/2)+I)*sin((1/5)*Pi)+(1/2)*5^(1/2)+3/2)

sqrt( Re(v)^2 + Im(v)^2 );

((-(1/4)*2^(3/10)*(5-5^(1/2))^(1/2)*sin((1/5)*Pi)-(1/8)*2^(4/5)*((1/2)*5^(1/2)+3/2))^2+((1/16)*2^(3/10)*(5-5^(1/2))^(1/2)*(5^(1/2)+1)-(1/8)*2^(4/5)*(5^(1/2)+1)*sin((1/5)*Pi))^2)^(1/2)

 

Download complex.mw

Here is the same thing in Mathematica:

I searched help for modulus but could not find one.

Maple 2021.2

Can someone confirm, that autosave is not implemented for workbooks?

The only thing I can restore form a workbook session are specific worksheets of the workbook that I was working on.

None of the Maple codes are saved for example.

This is a major issue, folks. If you haven't implemented it, you need to tell us about it in the help document.

IN CAPITAL LETTERS!

Hi all,

Do you know how one can ask Maple to show expressions involving special functions using their"classical symbols" instead of the associated Maple's command ?

Thanks !

Kevin

I following a example of products multiplication like this one

u:=n->Product(2*k-1,k=1..n)/Product(3*k-1,k=1..n)*x^n;

Calculating with  this with maple 1d input is correct, but when i convert a maple 1d input  to 2D input ( i did somewhere) and use this then there is difference with the maple 1d calculation

Seems to be not a advisable to use converted maple 1d to 2 D input for calculation : ( for a mixed calculation(maple input/2D input)  or solely 2d input) , but only for purpose of seeing what the expression in maple input is standing for.   

Note: i did the calculation again with mixed input and now the correct sequenze of answers shows up ?

Just wanted to post that I had some data loss because I opened two different workbooks with the same name from different locations.

This could lead to loss of data.

I had code attachments from the "old" workbook implemented in the "new" workbook, while the new code was gone.

The prime notation as used default on my keyboard is not the same as used in Maple.

NULL

restart;

with(student):

interface(typesetting = extended);

extended

(1)

Typesetting:-Settings(typesetprime = true);

true

(2)

diff(y(x), x)

diff(y(x), x)

(3)

y*`\`   `and  diff(y(x), x)are not working on my keyboard as prime?

 prime symbols (not showed)  not as (3)

 ========================================

restart

kernelopts(version)

`Maple 2021.1, X86 64 LINUX, May 19 2021, Build ID 1539851`

(4)

interface(typesetting = extended)

diff(y(x), x)

diff(y(x), x)

(5)

Typesetting:-Settings(typesetprime = true)

diff(y(x), x)

diff(y(x), x)

(6)

"y^((3))"

diff(diff(diff(y(x), x), x), x)

(7)

PDEtools:-declare(y(x))

y(x)*`will now be displayed as`*y

(8)

diff(y(x), x)

diff(y(x), x)

(9)

"y^((3))"

diff(diff(diff(y(x), x), x), x)

(10)

PDEtools:-declare(f(x, y))

f(x, y)*`will now be displayed as`*f

(11)

diff(f(x, y), y, x, y)

diff(diff(diff(f(x, y), x), y), y)

(12)

=================================================

Application Differential equation :  

int((10000*k/(100*k*P(t) - 1) - 100/P(t))*diff(P(t), t), t = 0 .. t) = t;

int((10000*k/(100*k*P(t)-1)-100/P(t))*(diff(P(t), t)), t = 0 .. t) = t

(13)

P(t)=solve(%,P(t));

Error, (in solve) cannot solve expressions with diff(P(t), t) for P(t)

 

This error .. see  Applications to Differential Equations

Applications to Differential Equations

   

 

NULL

Download vraag_over_dv_in_harald_pleym_-error_.mw

Also a error in old studymaterial : how to be fixed ? ...or obselote now this calculation and must be replaced for a modern calculation in Maple ?

question8.mw

In the exercise uploaded I have to plot asymptotes of a function. I know this is possible using definitions of all kind of asymptotes and ploting in a figure. However I would like to know if exists some parameter for plot method that automatically show asymptotes.

question7.mw

NULL

***e2.106

 

Plot this couple of parametric equations, identify the geometric figure known as the folium of Descartes , and relate properties of the figure to numerical coefficients in the equations.

  x = 3*t/(t^3+1), y = 3*t^2/(t^3+1)   

NULL

restart: with(plots):

 

 

 

See how the plot of the folium of Descartes can be built with the following code:

d1 :=

Error, invalid terms in product: -10 .. 10

Error, invalid terms in product: -10 .. 10

Error, (in plots:-pointplot) points cannot be converted to floating-point values

NULL

NULL

Download question7.mw

For this question I need that who help me focus in second block of code in the document. Basically, what I am trying is to get a plot of folium of Dercastes using parametric equation to plot ordered pairs. In order to success, is needed to exclude t=-1. In the block is showed what I tried. I concluded that my approach in solving that part of exercise is wrong. What could be a well approach?

I have to do this  diff(f(x), x) = f(1/x), f(0) = 0 , but it gives me the error on solution := dsolve(equations) :Error, (in dsolve) found the indeterminate function f with different arguments {f(x), f(1/x)} and I know what to do, please help me

Thought always that the round d is reserved for function of two variables x,y , but  that seems to be not the case here ?

restart;

Comparing Different Answers

 

Een antwoord ergens gegeven is

Int(sqrt(x^2+1), x) = (1/2)*x*sqrt(x^2+1)+(1/2)*ln(x+sqrt(x^2+1)) + C                                                             (vb)

 

Mple geeft

 

Int(sqrt(x^2+1),x)=int(sqrt(x^2+1),x)+C[1];

Int((x^2+1)^(1/2), x) = (1/2)*x*(x^2+1)^(1/2)+(1/2)*arcsinh(x)+C[1]

(1)

 

De twee antwoorden lijken nog niet opelkaar !
In het gegeven antwoord staat er een ln en in Maple kan een expressie omgezet worden in ln termen
  

convert(%,ln);

Int((x^2+1)^(1/2), x) = (1/2)*x*(x^2+1)^(1/2)+(1/2)*ln(x+(x^2+1)^(1/2))+C[1]

(2)

(2)  is hetzelfde (vb)

Dezelfde integraal i sook gegeven als

Int(sqrt(x^2+1),x)=((x+sqrt(x^2+1))^2+4*ln(x+sqrt(x^2+1))-(x+sqrt(x^2+1))^(-2))/8+C[2];

Int((x^2+1)^(1/2), x) = (1/8)*(x+(x^2+1)^(1/2))^2+(1/2)*ln(x+(x^2+1)^(1/2))-(1/8)/(x+(x^2+1)^(1/2))^2+C[2]

(3)

Controle

een effectieve manier om twe antwoorden t evergelijken voor hetzelfde probleem is het verschil te berekenen van een vergelijking met de twee integralen

#lhs(%);

#rhs(%%);

 

#diff(lhs(%)-rhs(%)=0,x);

NULL

#diff(f,x);

diff(lhs(%)-rhs(%)=0,x);

(x^2+1)^(1/2)-(1/4)*(x+(x^2+1)^(1/2))*(1+x/(x^2+1)^(1/2))-(1/2)*(1+x/(x^2+1)^(1/2))/(x+(x^2+1)^(1/2))-(1/4)*(1+x/(x^2+1)^(1/2))/(x+(x^2+1)^(1/2))^3 = 0

(4)

simplify(%);

0 = 0

(5)

Strange that  diff(lhs(%)-rhs(%)=0,x);  is translated by 2 d input with round d notation for functions with two variables ?
The two integrals are functions of one variable
diff(f, x)

Download Controleren_dezelfde_antwoord_voo_expressies.mw

Here is a problem that I recently had to solve and I really liked it. I recommend it to all Maple fans:

"The contour of the Christmas tree on the occasion of the New Year 2022 is a triangle, which is divided into 7 small triangles, the bases of which are parallel. The areas of triangles and the star are measured in snowflakes, the values of which are presented on the balls (of course, the number of snowflakes must be integer). It is necessary to determine the areas of triangles, on the balls of which there are no numbers".

At first glance it seems that the area of the star is not related to the problem, but it is not. This will become clear only after the problem is solved.

                          alt text


 

First 222 223 224 225 226 227 228 Last Page 224 of 2097