Maple 2019 Questions and Posts

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

In the past I worked with mathcad where it was very easy to work with units. Now I try to switch to Maple but I am still struggling when I want to implement units. In the simple attached worksheet I try to multiply vector a in [m] with vector b in [cm]. I get an answer in [m] but I cannot convert the answer to another unit. Right clicking allows me to change the unit e.g. to mm but nothing happens in the worksheet. When I use convert, the units are expressed numerical in cm but the vector still shows m. My apologies in advance for this simple questions but I find no way to solve my issue.

CollabExample.mw

I am trying to use type(sqrt(t)*Y[1, -3]*Y[2, -6], monomial) to check if an expression is a monomial. But it returns false which is not correct. How to check that an expression in Maple is a monomial? Thank you very much.

Dear All, If I understood well dsolve uses the RK45 method to solve an ODE. I would like to compare the results of tha attached worksheet with the results of another software that uses RK4 as a standard. Can I adapt my worksheet to use RK4 and how do you do that? Thanks in advance for your willingness to help me out.QMP_Nov21.mw

I have the following code. I want to do the modify it so that:

1. The outputs of each for loop are merged in such a way that the outputs from the first loop (Es) that are also outputs of the second loop (Fs) are removed from the outputs of (Es).

2. The resulting outputs G= .... are saved to a text file, one to each line.

3. In between each output, I want to add 5 lines of text and a blank line, say

text1 text2 text3

text2 text2 text3

text3 text3 text3

text4 text4 text4

text5 text5 text5

(blank line)

so that in the text file, the format is (e.g.)

G={{1,2}};

text1 text2 text3

text2 text2 text3

text3 text3 text3

text4 text4 text4

text5 text5 text5

(blank line)

G={{1,2},{1,3}};

text1 text2 text3

text2 text2 text3

text3 text3 text3

text4 text4 text4

text5 text5 text5

(blank line)

etc.

What is the easiest way to accomplish this?

restart;
 
with(GraphTheory):
 n:= 4:
  L:= NonIsomorphicGraphs
      ( n,
        output=iterator,
        outputform=graph):
  Es:= Array
       ( [ seq
           (  Edges( L() ),
              j=1..NonIsomorphicGraphs
                   ( n,
                     output=count
                   )
           )
         ]
       ):


  M:= NonIsomorphicGraphs
      ( n-1,
        output=iterator,
        outputform=graph):
  Fs:= Array
       ( [ seq
           (  Edges( M() ),
              j=1..NonIsomorphicGraphs
                   ( n-1,
                     output=count
                   )
           )
         ]
       ):
;

numelems(Es): 
for i from 1 to numelems(Es) do G:=Es[i]:  od;
                           
numelems(Fs):
for i to numelems(Fs) do G := Fs[i]; od;
                        

elctroWav.mw have the equation 1 :

eq1 := 2*m*(E + e0^2/(rb*rho))*g(rho, t)*(-rb*rho + R)/(h^2*R) + R*(diff(g(rho, t), rho, rho)*(-rb*rho + R)/R - 2*diff(g(rho, t), rho)*rb/R)/(rb^3*rho) - diff(g(rho, t), t, t)*(-rb*rho + R)/(a^2*c^2*R) = 0;

with iv1:

iv1 := D[1](g)(0, 0) - g(0, 0)*rb/R = rb*R, g(1, 0)*(R - rb)/R = 0, D[2](g)(rb, 0) = a*c;

As in maple document electroWav.mw

The issue is that there is an unsolved part with RootOf how can I rezolve it?

-R*h^2*RootOf(AiryBi(-(R*_Z^3*h^2 + 2*e0^2*m*rb^2)/(_Z^2*R*h^2)))^3

Please advice...

Dear Collaboratory, as a former mathcad user I am trying to transfer slowly towards Maple. In the attached file I have a problem in solving the ODE numerical. I would appreciate it if someone would be willing to help me out. I tried to upload my maple file but I am not sure it is attached.

Hello everyone.

Please help me solve this equation for u using Maple.

Div(u) = d(ru)/(dr)*1/r = 2*a = const; u = u(r);

``

Divergence(u) = d(ru)/(r*dr) and d(ru)/(r*dr) = 2*a and 2*a = const

u = u(r)


Thanks in advance for your help.

Hi all,
i'm working with the confluent Heun function (Maple 2019).
Since for the case of an integer coefficient delta or gamma there are two integer Frobenius roots at the regular singularities 0 or 1, there is a logarithmic term in the Frobenius solution at these singularities. So, my question is the following:
When moving around this singularity in the complex plane, the value of the logarithmic term might depend on the choice of the complex logarithm's branch cuts. So, does anybody know just about how HeunC is implemented? Is there sth like a power series solution, which value would in my oppinion depend on this choice of a branch cut?
Or is there another implementation that preserves us from this ambiguity in the case of logarithmic singularities (i.e. integer coefficients in the confluent Heun equation)?

Many thanks,

Hi, I am new to MAPLE and trying to solve the given BVP using shooting method but after defining the expression in u0 and u1, the code didn't compute the numerical value, and so that the whole code won't run exactly.
Please help me out to figure out the problem. I am looking for the answer. (NOTE: I copied this code from the web and it run so fine with the example but when I changed it according to me, it give me errors.)
The code is given below:
Thanks


restart;
with(DEtools);
with(plots);
dpdexi := 2;
K := 0.2;
epsilon := 0.0001;
                       epsilon := 0.0001
ode1 := (diff(phi(eta), eta) + epsilon*K*diff(phi(eta), eta)^3)/(1 + epsilon*diff(phi(eta), eta)^2) = dpdexi*eta;
bc1 := phi(0) = 0, phi(1) = 0;
a := 0;
b := 1;
ic1 := bc1[1], D(phi)(a) = alpha;
constraint := lhs(bc1[2]) - rhs(bc1[2]);
constraint = 0;
a0 := 0;
u0 := eval(constraint, phi(b) = PHIb(eval({ic1, ode1}, alpha = a0), phi(eta), b));
a1 := 0.01;
u1 := eval(constraint, phi(b) = PHIb(eval({ic1, ode1}, alpha = a1), phi(eta), b));
while fnormal(u1 - u0) <> 0 do
    z := solve(u1 = (u1 - u0)*(a1 - x)/(a1 - a0), x);
    a0, a1 := a1, z;
    u0, u1 := u1, eval(constraint, u(b) = Ub(eval({ic1, ode1}, alpha = z), u(x), b));
end do;
alpha_opt1 := z;
shoot_sol1 := evalf(dsolve(eval({ic1, ode1}, alpha = alpha_opt1), u(x), implicit));
infolevel[dsolve] := 3;
exact_sol1 := combine(dsolve({bc1, ode1}, u(x)));
infolevel[dsolve] := 0;
plot([rhs(exact_sol1), rhs(shoot_sol1)], x = 0 .. 1, color = [BLACK, RED], thickness = [5, 2], legend = ['exact', 'shooting'], title = "Figure 17.3");
evalf(eval(rhs(shoot_sol1), x = 1));

Ive got a question about the Dutch book again. They sure did their part on finding questions with answers you cannot find in the book (maybe in later chapters or the 2nd book "part 2"). Maybe to make sure you go to the teacher, so he sees you, and he is sure you did your part, and to get some interaction between the student and the teacher.

I guess you guys/girls are the teacher... Hahah :)

It is the 3rd question. It says: "given is the funtion y=f(x) ( see the photo for the function, "voor" means "for")

a. Draw the graph of y=f(x)
b. Draw with the help of the graph of y=f(x), a graph y=f(-x),y=-2f(x),y=f(x-1), and y=(2x)"

This paragraph is about shifting graphs of functions, and how to alter them. I know how it works, ive done that quite some time ago, but now in maple it is a new challange. Is there a way to get the funtion f(x) to adhere to the rules imposed on it by the text in the book? If that can be done, the answering of the questions will be a lot easier!

Thank you!

Greetings,

the function 

I have some more questions, now i get some more odd situations where an obvious answer cannot be given by solve. And a funtion cannot be plotted somehow. 

Here is the file. I tried to understand why, but it is not happening. They did it on purpose (i guess) to get simple questions, and show you that Maple sometimes does not have the answer right away. So you run into the "limitations" of the program right away so you are aware what could go wrong.

Find x with the help of a graph from: 2^x<1/2*x^2+2  

smartplot([2^x, (1/2)*x^2+2])

 

solve(2^x = (1/2)*x^2+2, x)

Warning, solutions may have been lost

 

RootOf(_Z^2-2*2^_Z+4)

(1)

"f(x):=2^(x)"

proc (x) options operator, arrow, function_assign; 2^x end proc

(2)

"g(x):=1/(2)x^(2)+2"

proc (x) options operator, arrow, function_assign; (1/2)*x^2+2 end proc

(3)

evalf(solve(f(x) = g(x), x))

Warning, solutions may have been lost

 

.8841764608-2.067784075*I

(4)

While the answer is obviously x=2 to be equal, and thus for values of x= (infinity;2> g(x) is larger, even if you would manually fill in the equetions,you get a value of 2. Both sides would get a solution of y=4. Somehow Maple does not give a straight answer.

``

2nd question
I have to plot this function, and it wont let me plot it..

"f(x):=(-2)^(x)"

proc (x) options operator, arrow, function_assign; (-2)^x end proc

(5)

plot(proc (x) options operator, arrow, function_assign; (-2)^x end proc)

 

I am not seeing a line, it is so odd.

``

Download Applied_Math_Part_1_questions_part_two.mw

The function

Hello, ive got some trouble calculating this problem. Ive been looking at it for quite some time. I suspect you first need to differentiate to get the minimum value and then make it back to p. Time is ticking away, and i can just cant get it right. Its 2 questions out of some Dutch mathbook from 2007. It has a lot of Maple in it too. Just so to get a broad a view on maple as possible. I must say these maplebooks have quite the repertoirs. The other book "Advanced Problem Solving Using Maple" book turns you into some British chap. And this book:"toegepaste Wiskunde voor het hoger beroepsonderwijs deel 1"(translated applied math for higher job education part 1), turns you into the odd obnoxious Dutch mathematician... Well what can i say??

Here are the questions: 

1st Question:
For which values of p does the graph of the function: y=f(x)=(p*x^2)+3*p*x+1 have one intersection with the x-axis? When does it have two intersections with the x-axis? When does it have no intersections with the x-axis. 

2nd Question:
Given functions are: y=f(x)=(x^2)-6x+p+3, and y=g(x)=(4x^2)-(p-8)x+7. When do these functions have the same minimum value. Calculate p and the minimum value.

Greetings,

1st Question:
For which values of p does the graph of the function: y=f(x)=(p*x^2)+3*p*x+1 have one intersection with the x-axis? When does it have two intersections with the x-axis? When does it have no intersections with the x-axis.  

f(x) = p*x^2+3*p*x+1

f(x) = p*x^2+3*p*x+1

(1)

NULL

restart

2nd Question:
Given functions are: y=f(x)=(x^2)-6x+p+3, and y=g(x)=(4x^2)-(p-8)x+7. When do these functions have the same minimum value. Calculate p and the minimum value.

f(x) = x^2+p-6*x+3

f(x) = x^2+p-6*x+3

(2)

g(x) = 4*x^2-(p-8)*x+7

g(x) = 4*x^2-(p-8)*x+7

(3)

``

Download Applied_Math_Part_1_questions.mw

the function

Hello, There seems to be a bug in the int() routine when CPV is being used i.e.

restart;
f1 := (int(t^(2*a - 1)/(-t^2 + 1), t = 0 .. infinity, CPV = true) assuming (0 < a, a < 1));

the result given is

f1 := Pi/(2*sin(Pi*a)*(-1)^(1 - a))

but the correct result is

f1 := Pi/2*cot(Pi*a).

 

Dear everyone, ive been trying to get to learn Maple, and i am using the book: Advanced Problem
Solving Using Maple. 

I am having issues with not getting the same results as the examples. Although i am using the same imput as the examples. So to me that is really odd. I also noted to get the same results as the examples, i had to change the imput to get there. Now this is a bit more complex problem, and i cant figure out where it went wrong. 

Can you help me?

It did seem to produce the answers, however not in the same fashion as the example in the book. I still had to add the values together. No the solution i got is not what i am looking for. 

Greetings,

 

The Function 


 

DDS := a(n+1) = (1+.12*(1/12))*a(n)+1000

a(n+1) = 1.010000000*a(n)+1000

(1)

rsolve({DDS, a(0) = 0}, a(n)); a := unapply(%, n)

proc (n) options operator, arrow; 100000*(101/100)^n-100000 end proc

(2)

plot([-100000+100000*(101/100)^n], n = 0 .. 100, a = 0 .. 200000)

 

pts := {seq([k, a(k)], k = 0 .. 24)}; plot(pts, style = point, title = "Savings Account with Monthly Deposit")

 

rsolve({a(0) = 497.5124378, a(n+1) = -1.01*a(n)+1000}, a(n))

-(11/1005000000)*(-101/100)^n+100000/201

(3)

plot([-(11/1005000000)*(-101/100)^n+100000/201], n = 0 .. 20, a = 0 .. 1000)

 

solve(ev = -1.01*ev+1000, ev)

497.5124378

(4)

rsolve({a(n+1) = .5*a(n)+16}, a(n))

a(0)*(1/2)^n-32*(1/2)^n+32

(5)

rsolve({a(0) = 10, a(n+1) = .5*a(n)+16}, a(n))

-22*(1/2)^n+32

(6)

smartplot(-22*(1/2)^n+32)

 

rsolve({a(0) = 20, a(n+1) = .5*a(n)+16}, a(n))

-12*(1/2)^n+32

(7)

smartplot(-12*(1/2)^n+32)

 

rsolve({a(0) = 32, a(n+1) = .5*a(n)+16}, a(n))

32

(8)

rsolve({a(0) = 50, a(n+1) = .5*a(n)+16}, a(n))

18*(1/2)^n+32

(9)

smartplot(18*(1/2)^n+32)

 

solve(ev = .5*ev+16, ev)

32.

(10)

solve(ev = .5*ev+64, ev)

128.

(11)

rsolve({a(0) = A, a(n+1) = .5*a(n)+64}, a(n)); a := unapply(%, [A, n])

A*(1/2)^n+128-128*(1/2)^n

(12)

inits := [0, 50, 100, 150, 200]

gen := proc (i, j) options operator, arrow; evalf(a(inits, i)) end proc

proc (i, j) options operator, arrow; evalf(a(inits, i)) end proc

(13)

DrugConcTable := Matrix(10, 5, gen)

Matrix(%id = 18446746425282593366)

(14)

help("matrix")

``

``


 

Download Discrete_Dynamical_Models_2.mw

 

This research work demonstrates the use of the MapleSim and Python scientific packages for the correct use of differential equations for engineering students, in the face of the pandemic generated by COVID-19. The main objective is to visualize the teaching and learning process of the subject presented. The methodology used is block diagrams using graphic programming and the one-dimensional symbolic structure. The results are totally optimal since automation was achieved in the differential equations applied to different engineering cases. The applications generated by the scientific software are fully upgradeable and available in the cloud.

Ponencia_CIMAC_2021.pdf

Lenin AC

Ambassador Maple

2 3 4 5 6 7 8 Last Page 4 of 42