Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

 

 

a) Given real values 𝑟1,𝑟2,𝑟3>0, consider the curve of the positive part of the circle with radius 𝑟1+ 𝑟2+𝑟3 and center at the origin and three semi-circles below with radii 𝑟1,𝑟2,𝑟3 so that they are arranged from left to right like the following graph. Define proper functions and plot this graph in Maple for 𝑟1=10,𝑟2=2,𝑟3=8. 

Cursor jumping to end of sheet/page when pressing enter (calculating).

How do I change the settings in maple 2019 so that the cursor doesnt jump to the end of the page/document everytime I make a calculation. 

Thanks!

Jeppe
 

Hello,

I don't understand why Maple gives me the following error:

Error, (in fsolve/Iterators) unrecognized form

The full maple file:


 

restart

mbal := 0.28e-2:

rbal := 0.2e-1:

Cw := .47:

g := 9.81:

A := Pi*rbal^2:

beta := 3.33*Pi*(1/180):

s0x := .2:

s0y := .25:

rho := 1.293:

l := 2:

vx := diff(sx(t), t);

diff(sx(t), t)

(1)

vy := diff(sy(t), t);

diff(sy(t), t)

(2)

ax := diff(sx(t), `$`(t, 2));

diff(diff(sx(t), t), t)

(3)

ay := diff(sy(t), `$`(t, 2));

diff(diff(sy(t), t), t)

(4)

v0x := cos(beta)*v0;

cos(0.1850000000e-1*Pi)*v0

(5)

v0y := sin(beta)*v0;

sin(0.1850000000e-1*Pi)*v0

(6)

`ΣFx` := -Fdx = mbal*ax;

-Fdx = 0.28e-2*(diff(diff(sx(t), t), t))

(7)

`ΣFy` := -Fz-Fdy = mbal*ay;

-Fz-Fdy = 0.28e-2*(diff(diff(sy(t), t), t))

(8)

Fz := mbal*g;

0.27468e-1

(9)

Fdx := .5*rho*vx^2*A*Cw;

0.1215420e-3*(diff(sx(t), t))^2*Pi

(10)

Fdy := .5*rho*vy^2*A*Cw;

0.1215420e-3*(diff(sy(t), t))^2*Pi

(11)

ics1 := sx(0) = s0x, (D(sx))(0) = v0x;

sx(0) = .2, (D(sx))(0) = cos(0.1850000000e-1*Pi)*v0

(12)

ics2 := sy(0) = s0y, (D(sy))(0) = v0y;

sy(0) = .25, (D(sy))(0) = sin(0.1850000000e-1*Pi)*v0

(13)

verplaatsingx := dsolve({ics1, `ΣFx`}, sx(t));

sx(t) = (1400000/60771)*ln((60771/1400000)*cos((37/2000)*Pi)*v0*exp((60771/7000000)*Pi)*t*Pi+exp((60771/7000000)*Pi))/Pi

(14)

verplaatsingy := dsolve({ics2, `ΣFy`});

sy(t) = (1/243084)*(60771*Pi+2800000*ln((1/92736546000)*(20257*Pi^(1/2)*sin((37/2000)*Pi)*v0*sin((3/70000)*231841365^(1/2)*Pi^(1/2)*t)+20*231841365^(1/2)*cos((3/70000)*231841365^(1/2)*Pi^(1/2)*t))^2))/Pi

(15)

eindy := rhs(verplaatsingy) = rbal;

(1/243084)*(60771*Pi+2800000*ln((1/92736546000)*(20257*Pi^(1/2)*sin((37/2000)*Pi)*v0*sin((3/70000)*231841365^(1/2)*Pi^(1/2)*t)+20*231841365^(1/2)*cos((3/70000)*231841365^(1/2)*Pi^(1/2)*t))^2))/Pi = 0.2e-1

(16)

eindx := rhs(verplaatsingx) = l;

(1400000/60771)*ln((60771/1400000)*cos((37/2000)*Pi)*v0*exp((60771/7000000)*Pi)*t*Pi+exp((60771/7000000)*Pi))/Pi = 2

(17)

t := solve(eindy, t);

RootOf(1397733*Pi+70000000*ln((1/92736546000)*(20257*Pi^(1/2)*sin((37/2000)*Pi)*v0*sin((3/70000)*231841365^(1/2)*Pi^(1/2)*_Z)+20*231841365^(1/2)*cos((3/70000)*231841365^(1/2)*Pi^(1/2)*_Z))^2))

(18)

t := evalf(t[1]);

RootOf(1397733*Pi+70000000*ln((1/92736546000)*(20257*Pi^(1/2)*sin((37/2000)*Pi)*v0*sin((3/70000)*231841365^(1/2)*Pi^(1/2)*_Z)+20*231841365^(1/2)*cos((3/70000)*231841365^(1/2)*Pi^(1/2)*_Z))^2))[1]

(19)

v0 := fsolve(eindx, v0)

Error, (in fsolve/Iterators) unrecognized form

 

``

``


 

Download ttbuddymaple.mw

 

Thank you!

 

Hey everyone,

Got another Symbolic question here that I have no idea how to begin. Please help again.

Question: 

Note that if i is an integer then convert(i,base, 2) will convert i to a binary list (the binary representation of i in reverse order). Then you may use list_to_set to convert  this list to a set. Note that if i runs from 0 to 2^n-1 then list_to_set(convert(i,base,2) )  will run through all subsets of {1, 2, . . ., n}. 

(a) Use this idea to make your own procedure PowerSet which will given n,  produce the powerset of {1, 2, . . . , n}. Show by several examples that your procedure works. For your examples you should get nops(PowerSet(n)) = 2^(n). Check that this is the case.
 
(b) Use this idea to make a procedure RandSet which given n produces a random subset of {1, 2, . . . , n}. [Use rand to produce a random integer in the range 0..2^n-1 and then convert it to a subset of {1, 2, . . . , n}.]  Do NOT use PowerSet or powerset. Show by examples that it works for small n such as 5, 10, and 20 as well as for large n such as 100. It will even work for n = 1000, but the output will be rather large. On average a random subset of {1,2,...,n} will contain n/2 elements.

Again, please help me with this and thank you in advance. Your assistance is appreciated.

Hi all,

First-time poster here. Got a question for Symbolic Computations and don't know how to do it. Please help me out.

Here is the question: 

There is a one-to-one correspondence between subsets of {1, 2, . . . , n} and binary lists of length n, that is, lists L = [x1, x2 , . . . , xn] where x1, x2, . . . , xn are elements of the set {0,1}.  The correspondence is given by associating to the set S the list L where xi = 1 if i is in S and 0 if not. For example, the set {1,3,5} corresponds to the list [1,0,1,0,1,0,0] if n = 7.

(a) Write a procedure list_to_set whose input is a binary list and whose output is the corresponding set. E. g., list_to_set([1,0,1,0,1]) will return the set {1,3,5}. Note that nops(L) is the length of a list.

(b) Write a procedure set_to_list whose input is a pair S,n where S is a subset of {1, 2, . . . , n} and n is a positive integer and whose output is the binary list of length n corresponding to the set S. E. g., if n = 5 then set_to_list({1,3,5},5) will return [1,0,1,0,1].

(c) Show by a few tests that each procedure works. Then apply set_to_list to each set in the powerset of {1, 2, 3, 4} to form all binary lists of length 4. Make a program to print out a table of the following form. (But the order need not be the same as that started below.)

   [0,0,0,0] <-->  {  }
   [1,0,0 0] <--> { 1 }
   [0,1,0,0] <--> { 2 } 
    ........
    etc

Some extra commas in the output is okay. You may obtain the power set of the set {1,2,...,n} by the command powerset(n); but you must first load the package combinat.

Please let me know if there are any questions. Thank you in advance.

I have a question with a proc containing "if" statement. 
i want maple to do the calculations without just like Heaviside function does. how can it be done?is it possible?

restart

f1:=proc(x)
if x>=0 then 1
else 0
fi:end proc:

Matrix(2,[[f1(x)+2,2*f1(x)],[5,4]]);

Error, (in f1) cannot determine if this expression is true or false: 0 <= x

 

P:=f1(x)*exp(x)+5*x;

Error, (in f1) cannot determine if this expression is true or false: 0 <= x

 

diff(P,x)

0

(1)

 

 


but i can do all of the above with Heaviside(x). can i do the same with my procedure?

Download if.mw

Maple can't solve the following symbolic integration for me and it remains in the state of evaluating when I use simplify and nothing happens after hours.. any solution? 

I was thinking maybe there is something wrong with my maple !!?

 

eq0:=R__i=(1/2)*d+L__1;
eq00:=R__f=c+(1/2)*d+L__1;
eq39:=R(beta)=R__i+2*beta*(R__f-R__i)/Pi;
eq39a:=simplify(subs([eq0,eq00], eq39));
eq38:=R__max(theta,beta)=R__max(theta,0)*(R(beta)/R__i);
eq41:=R__max(theta,0)=((2*L__1*cos(theta)) + sqrt(d^2 - 2*(L__1)^2 + 2*(L__1)^2*cos(2*theta)))/2;
eq38a:= simplify(subs([eq41,eq39a,eq0], eq38));

R__i = L__1+(1/2)*d

 

R__f = c+(1/2)*d+L__1

 

R(beta) = R__i+2*beta*(R__f-R__i)/Pi

 

R(beta) = L__1+(1/2)*d+2*beta*c/Pi

 

R__max(theta, beta) = R__max(theta, 0)*R(beta)/R__i

 

R__max(theta, 0) = L__1*cos(theta)+(1/2)*(d^2-2*L__1^2+2*L__1^2*cos(2*theta))^(1/2)

 

R__max(theta, beta) = (1/2)*(2*L__1*cos(theta)+(d^2-2*L__1^2+2*L__1^2*cos(2*theta))^(1/2))*(2*L__1*Pi+Pi*d+4*beta*c)/(Pi*(2*L__1+d))

(1)

eq44 := v__m(beta) = 1/int((1 - r^2/R__max(theta, beta)^2)*r, [r = 0 .. R__max(theta, beta), theta = 0 .. 2*Pi]);

v__m(beta) = 4/(int(R__max(theta, beta)^2, theta = 0 .. 2*Pi))

(2)

eq44a:=simplify(subs(eq38a,eq44));

``


Download int.mw

 

linkedlist.zip

I am having a problem understanding how to pretty print the results of a procedure incorporated into a module installed as a package using the maple workbook(.maple).  In an effort to understand how this should be done, I installed the LinkedListPackage from the example code using a maple workbook to see if the package works as shown in the help files. The results from this exercise confirmed the problem I am having with a module I am creating. Specifically, as shown in the help file, I assigned the exported name “nil” to L; ie. L := nil; Note that the result is L:= linkedlist:-nil not L:= nil.  Furthermore when I create a linked list the results are as shown below:  

L := ``(1, linkedlist:-nil)
L := ``(2, ``(1, linkedlist:-nil))
L := ``(3, ``(2, ``(1, linkedlist:-nil)))
L := ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))
L := ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil)))))
L := ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))))
L := ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil)))))))
L := ``(8, ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))))))
L := ``(9, ``(8, ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil)))))))))
L := ``(10, ``(9, ``(8, ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))))))))

I realized that nil is an exported local variable which is being reflected in how it presents in the worksheet, but in an expression of any complexity presenting exported local names in this way makes the expression unreadable. I have been combing help looking for a clue as to how the results from the package can be pretty-printed without a fully-qualified name. Can you suggest how I should proceed.

My other question concerns the macro command which is used in the example code to format the pairs.  As written in the help file, the macro command is intended to replace the name _PAIR with a space.  However, it seems that the macro facility now replaces _PAIR with name quotes instead of a space. Has the macro facility changed since the example was written?

for example,transform diff(u(x,y),x) with xi=xi(x,y) and eta=eta(x,y);

it should be

diff(u(x,y),x)=diff(u(xi,eta),xi)*diff(xi(x,y),x)+diff(u(xi,eta),eta)*diff(eta(x,y),x)

I want to do min max algebra in maple but dont know how to start. What package is required . Can anyone help me. 

I want to find coodinates of the point A, B, C, D and X of a problem 6 at IMO 2018 https://www.imo-official.org/problems.aspx

I tried 

 

restart:
 with(Student:-MultivariateCalculus):
 A := [0, 0]; 
B := [5, 0]; 
C := [3, 4]; 
DD := [a, 2]; 
solve([Distance(B, A)*Distance(C, DD) = Distance(B, C)*Distance(A, DD)], [a]);

How can I get coordinate X lies inside life request?

Hi,

I'm trying to implement Kernal PCA, I've got a large kernal matrix for which I have checked the elements are of floating point type, however when I try to run the Determinant operation on the matrix all of the coefficients say float(undefined).

In the same worksheet, there I have implemented the standard PCA routine, for which the determinant operation works fine. You can see this operation functioning corrrectly in it's testing section.

If anyone has any idea why this might be occuring I'd be really grateful for some advice.

Thanks

FUML.mw

 

Hello !

I want to plot its steamlines and Isotherms for different parameters. Anyone can help me for this issue.

eq1:=diff(f(eta),eta,eta,eta)+f(eta)*diff(f(eta),eta,eta)-(diff(f(eta),eta)^2)-M*diff(f(eta),eta)=0:
eq2:=(1+R)*1/Pr*diff(theta(eta),eta,eta)+f(eta)*diff(theta(eta),eta)=0:
bc:=D(f)(0)=1,(f)(0)=0,(D)(f)(N)=0,theta(0)=0,theta(N)=1:
Pr:=1:R:=0.5:M:=0.5:N:=10:


 

Hello World (again);

For your edification, look at  a file.

L

fine_semiprime_2.mw

For what it's worth

Regards,

Matt

 

Can anyone explain the reasoning that went into the programming decisions that led Maple to give these results?

restart:
is(-infinity, complex); #expected: false
                             false 
is(-infinity-I*infinity, complex); #expected: false
                              true
exp(-infinity - I) = limit(exp(x-I), x= -infinity); #expected: 0=0
                         infinity*I = 0
is(exp(x)<>0) assuming x::complex; #expected: true
                             false
is(exp(x)<>0) assuming x::real; #expected: true
                              true
coulditbe(exp(x)=0) assuming x::complex; #expected: false
                              true

 

5 6 7 8 9 10 11 Last Page 7 of 1604