MaplePrimes Questions

I have to plot 10 squares each one inscribed into each other. After the first one, which is a square with a side of 10m, each following square has got each edges wich are distant from the previous edges (side of the previous square)/4 metres, on the

 

sides of the previous square

How can i draw it?


 

Hello,

To check my arguments in a procedure I need something like

myproc := proc(M :: Matrix(square, rational)

                       , N :: Matrix(shape=triangular[lower, unit], datatype = rational
                       , O :: Matrix(shape = square, dimension = 5

               )

end proc;

How does that work in Maple? What is the correct Syntax? I tried many different things that doesn't fit.

If I calculate the integral:

z:=exp(I*t)

evalf(Int(z^(1/2)*(diff(z, t)), t = 0 .. 2*Pi))

I get -1.33333333*I

If I calculate

int(z^(1/2)*(diff(z, t)), t = 0 .. 2*Pi)

I get -4/3

so where is the I coming from? Am I doing sth  something   wrong?

I might add: if I calculate the same for z:=0.5+exp(I*t) I get 0 and -I*0.4714....

so what is going different here?

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?

I am trying to use a do loop with if/else statements to create a 5x5 unit matrix. I made an empty array. Converted it to a matrix. Then made a do loop where I was trying to get the matrix elements where i=j to be 1 and all else to be 0. It didn't spit out a matrix.

Any advice? I assume I must have missed a small detail in syntax.


 

with(LinearAlgebra):

````

U := array(1 .. 5, 1 .. 5);

array( 1 .. 5, 1 .. 5, [ ] )

(1)

NULL

for i to 5 do for j to 5 do if i = j then U[i, j] := 1 else U[i, j] := 0 end if end do end do

U;

U

(2)

``


 

Download fail_unit_matrix_loop.mw

By the way, I am open to completely different methods, also! I was just trying to use loops to do it rather than inbuilt commands.

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]);

Suppose I have a questions that says simplify some random square root

using the algorithm

$radicand=range(10,50,1);
$ques="sqrt($radicand)";
$ques_exact=maple("simplify($ques);");
$ques_ML=maple("f := $ques_exact: XMLTools[Print](MathML[Export](f));");

How do I create an answer field that ONLY allows the student to provide the simplified answer $ques_ML??  How might I provide partial points if they do not simplify (for a classic pythag triangle question for example)?

Thank you

Hi,

I'm struggling to solve a problem with the Maple 2015 worksheet interface. I have a very dense 2D plot, with lots of oscillations, that was generated using Maple 2015 on Windows 10. Substantial parts of the plot are missing; it looks like the tips of the oscillations being clipped out. If I load the same worksheet into Maple 18 on Windows 7 then the plot looks fine (i.e. nothing is clipped). I've dug through the options in Maple 2015 and nothing I try seems to fix the problem. Any advice would be greatly appreciated.

Many thanks,
David

 

Hi,

I started using Maple recently. The output sometime is not simplified like that in the attached picture. How can I simplify such expressions?

http://www.maplesoft.com/applications/view.aspx?SID=1526&view=html

near the middle, it says

I just tried in Maple 2016 and that is not what it did. It says this was in Maple 8. It seems this was "fixed" in Maple 2015.

My question: How could Maple 8 have simplified rand()/rand() to 1 before evaluating rand()?  i.e. why was not rand() evaluated first, before the simplification was made? it seems to have worked as if one typed x/x , but rand() would have been a function, and it should be evaluated before?

Just wondering why Maple 8 did the above, that is all.

 

 

How to view the source code for a created .mv file in Maple?

 helo my friends,

i try to do this code, please help me to understant what is the problem

מציג את image.png

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

4 5 6 7 8 9 10 Last Page 6 of 1446