MaplePrimes Questions

add(q[k],k=1..5)

 

I'd like to be able to display a general result such as

q_1 + q_2 + ... + q_n

 

ideally maple would do all the special stuff for me, e.g., somehow I could do

add(q[k],k=1..2..n)

but I can't even seem to get a nice output manually that doesn't involve a lot of printing code.

Hi

Can maple compute the following integral

Integral ( z^(-0.5), z in M) where  M is the lower half-unit circle from +1 to -1

Many thanks

 

How I can apply the condition or assuming (a>0) in ?

I want to have a plot according to the attached figure.

restart; A5 := 2.4821; A3 := .8417; A4 := -.1384; K := 0.3e-2; `σσ` := (9*A3*A5*a^2-10*A4^2*a^2)/(24*A3^(3/2))+K/(2*a*A3^(1/2))

2.4821

 

.8417

 

-.1384

 

1.004210973*a^2+0.1634980569e-2/a

(1)

NULL

solve(sigma = 1.004210973*a^2+0.1634980569e-2/a, a)

solve(sigma = 1.004210973*a^2-0.1634980569e-2/a, a)

plot({1.079801433*10^(-25)*(-6.465854665*10^71+1.058832302*10^46*sqrt(-2.057991547*10^56*sigma^3+3.729044048*10^51))^(1/3)+3.074042610*10^24*sigma/(-6.465854665*10^71+1.058832302*10^46*sqrt(-2.057991547*10^56*sigma^3+3.729044048*10^51))^(1/3), 1.079801433*10^(-25)*(6.465854665*10^71+1.058832302*10^46*sqrt(-2.057991547*10^56*sigma^3+3.729044048*10^51))^(1/3)+3.074042610*10^24*sigma/(6.465854665*10^71+1.058832302*10^46*sqrt(-2.057991547*10^56*sigma^3+3.729044048*10^51))^(1/3)}, sigma = -.2 .. .2)

 

``


 

Download plot 

Normally the wheel mouse will scroll a file like it does in just about every other program... but when the mouse is over a code edit region it does nothing ;/ As one is scrolling with the wheel and a code edit region pops up this breaks the flow and requires hoops, I don't like hoops!

 

Seems most mouse funcitons do not work well in the region. Just trying to select and drag doesn't scroll the region.

I was writing in a maple document when suddently all the text and equations collapsed into a single line at the top, making it unreadable and unusuable. I was not able to restore a previous backup of the file, however i did manage to salvage a smaller part of the document. Both files are included. 
corrupted.mw 
what_i_managed_to_save.mw

ModularSquareRoot can't handle a really big n because of the factorization problem. But I would like to know if there is any other function than can use as parameters the factorization of n.

I already have an algorithm that does that for n=pq with p, q primers, and could generalize it, but I was wondering whether there was a built-in function that does that.

The Folium of Descartes (see the wikipedia page about this curve) is an algebraic curve defined by the equation 𝑥 ^3 + 𝑦 ^3 − 3𝑎𝑥𝑦 = 0, where 𝑎 is a constant. You will need the information on this wikipedia page in order to plot the following graphs. plot them for 𝑎 = 1,  Graph the curve with 𝑎 = 1 using the command implicitplot in the range of −3 ≤ 𝑥 ≤ 3 and −3 ≤ 𝑦 ≤ 3. (which i have already done)

However i am unable to Add a plot of the line 𝑥 + 𝑦 + 𝑎 = 0 on the same graph but dashed and with a different color (set numpoints as 10000).

Does global optimization toolbox has randomization option it gives same value every time

 

 

In addition to defining a function in a standard way, a fast and convenient way to turn a formula (an expression) into a function is to use unapply command (check Maple help center for this command). The following items are about defining functions. 

 

 

  1. Define a function midpoint, which returns the average of two arguments given on input. For example, midpoint(2,3) returns 2.5, midpoint(a,b) returns 𝑎+𝑏2. 
  2. b) For two positive natural numbers 𝑎 and 𝑏 we can define the least common multiple lcm(𝑎,𝑏) via their greatest common divisor gcd (𝑎,𝑏), i.e.: lcm(𝑎,𝑏) = 𝑎𝑏gcd (𝑎,𝑏). When 𝑎 and/or 𝑏 are zero, lcm(𝑎; 𝑏)=0. Use the arrow operator and piecewise to define the function my_lcm which returns the least common multiple of two natural numbers. 
  3. c) The quadratic formula allows to write the roots of 𝑝 = 𝑎𝑥2+𝑏𝑥+𝑐 explicitly in terms of 𝑎,𝑏, and 𝑐. 

 

 Define a piecewise function of 𝑥 so that the value of the function is 0, if 𝑥<−(𝑟1+ 𝑟2+𝑟3) or 𝑥>𝑟1+ 𝑟2+𝑟3, and it is equal to the area of confined region if −(𝑟1+ 𝑟2+𝑟3)<𝑥<𝑟1+ 𝑟2+𝑟3. 

 

 

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)

`&Sigma;Fx` := -Fdx = mbal*ax;

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

(7)

`&Sigma;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, `&Sigma;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, `&Sigma;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.

First 631 632 633 634 635 636 637 Last Page 633 of 2431