MaplePrimes Questions

Hi, I'd like to use something to compare expressions, so I thought evalb or verify.

I'd like to evaluate things like the identity,

logb(y) = y ∙ logb(x)

However using either I get:

> verify(2*log(x), log(x^2));

                             false
> evalb(2*log(x) = log(x^2));

                             false
now I thought maybe conditions might be different but as none are specified they should be the same in any domain. 

Not sure what is wrong or which comand is more suitable.

 

 

dear sir i want to plot a graph for different values of h(z) by applying do loop, hear is my codes

In K1 it should take first h(z)

In K2 it should take second h(z)

IN K3 it should take third h(z) 

restart:
h:=z->1-(delta2/2)*(1 + cos(2*(Pi/L1)*(z - d1 - L1))):
h:=z->1-(delta2/2)*(1 + cos(2*(Pi/L2)*(z - d2 - L2))):
h:=z->1+(delta2/2):
K1:=((4/h(z)^4)-(sin(alpha)/F)-h(z)^2+Nb*h(z)^4):
K2:=((4/h(z)^4)-(sin(alpha)/F)-h(z)^2+Nb*h(z)^4):
K3:=((4/h(z)^4)+(cos(alpha)/F)+h(z)^2+Nb*h(z)^4):
lambda1:=Int(K1,z=0..0.2):
lambda2:=Int(K2,z=0.2..0.4):
lambda3:=Int(K3,z=0.4..0.6):
lambda:=(lmbda1+lambda2+lambda3):

F:=0.3:
L1:=0.2:
d1:=0.2:
d2:=0.2:
L2:=0.3:
alpha:=Pi/6:
plot( [seq(eval(lambda, Nb=j), j in [0.1,0.2,0.3])], delta2=0.02..0.1);
 

I want to stop the following loop when there is no more roots. how can i do this?

 

 

I mean the following Maple 2017.3 result

restart; with(Statistics):
X := RandomVariable(Geometric(1/3)):
Probability(sin(X) <= 1/2);
                            2839595/4782969

Mma 11.2 fails with it. It's unclear for me how Maple calculates the above result. Trying printlevel:=10:, I don't understand much. Also the result

solve({x >= 0, sin(x) <= 1/2}, [x], AllSolutions);
Warning, solutions may have been lost
  
[[x <= (1/6)*Pi, 0 <= x], [x <= 13*Pi*(1/6), 5*Pi*(1/6) <= x], [x <= 25*Pi*(1/6), 17*Pi*(1/6) <= x],
 [x = 29*Pi*(1/6)]]

does not encourage.

How can I find period of the following function with respect to p?
 

 

Thanks,

I am trying to recreate some plots from the research paper https://arxiv.org/pdf/0807.1597.pdf found on page 13 and 14, but so far I havn't really gotten anywhere. Would appreciate some help or hints so I can get further.


I can see my error here.Problem with Sigma(n^3). I sure i have done something stupid.

restart

``

((1/2)*n*(n+1))^2

(1/4)*n^2*(n+1)^2

(1)

"(=)"

(1/4)*n^4+(1/2)*n^3+(1/4)*n^2

(2)

f := proc (n) options operator, arrow; sum(n^3, i = 1 .. n) end proc

proc (n) options operator, arrow; sum(n^3, i = 1 .. n) end proc

(3)

f(1)

1

(4)

f(2)

16

(5)

f(3)

81

(6)

1^3+2^3

9

(7)

1^3+2^3+3^3

36

(8)

``


 

Download Sigma_problem.mw
 

restart

``

((1/2)*n*(n+1))^2

(1/4)*n^2*(n+1)^2

(1)

"(=)"

(1/4)*n^4+(1/2)*n^3+(1/4)*n^2

(2)

f := proc (n) options operator, arrow; sum(n^3, i = 1 .. n) end proc

proc (n) options operator, arrow; sum(n^3, i = 1 .. n) end proc

(3)

f(1)

1

(4)

f(2)

16

(5)

f(3)

81

(6)

1^3+2^3

9

(7)

1^3+2^3+3^3

36

(8)

``


 

Download Sigma_problem.mw

 

Attached file is the maple code I have been working on and I am currently struggling to do the last bit ( which is a generalisation of the previous part). Please tell me what's wrong with my code. Thanks!

QuestionLab2.mw

Hello everyone, I have 4 equations 4 unknowns I would like maple to compute it.  i might actually have a problem by  solve({eq1, eq2, eq3, eq4}, {Omega, alpha, beta, k}) command

alpha , beta , omega and k are unknows.

 

 

2.mw

I am using the Physics package for quantum mechanic.

Ket product are supposed to be noncommutative and the Simplify function
appears to ignore the propety.

I must be doing someting wrong.

Thank you for your help

LL

Can anyone understand why this is happening?

 

 

 

 

 

hello everybody, the below expression has 5 variabes: t,c,theta[1],lambda,a and i want to know in what ranges of variables the expression is positive. how can i do that?

y:=2*t*(((-(1/2)*theta[1]+1)*c^2+((1/2-(1/2)*theta[1])*t+a)*c-(1/2)*t^2)*lambda^3+((-3*theta[1]*(1/2)+2)*c^2+((7/2-4*theta[1])*t+2*a)*c+3*t*((-(1/2)*theta[1]+1/6)*t+a))*lambda^2+((-3*theta[1]*(1/2)+1)*c+(-2*theta[1]+1/2)*t+a)*(3*t+c)*lambda-(1/2)*(3*t+c)*(c*theta[1]+t*(3*theta[1]-1)))/((-2*t*lambda^2+(3*t+c)*lambda+c+3*t)*(lambda*c+3*t+c)*(lambda+1))

i use solve() to find these ranges but it takes to much time. is there any alternative solution?

How do you can change value integrate 8+ln(3)-ln(7) into m+n*ln(3)+k*ln(7)

and ln(3), ln(7) can change into number other ...

help.mw

Its close to Valentine's Day on the 14th Feb.  I was hoping to combine the lemniscate and cardiod curves to make a decorative heart shaped "valentine".     Inn polar form the cardioid is r=2R(1 - cos theta)   and the lemniscate r=L*sqrt(cos(2*theta)

  However these are not with respect to the same origin:-(

Any suggestions please?

 

restart:

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

#  Lemniscate - Cardioid - Valentine

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

with(plots):

with(plottools):

#Lemniscate

pl1:=plot(sqrt(cos(2*x)),x=0..Pi/2, coords=polar, scaling=constrained):

#Cardioid

pl2:=plot(1-cos(x),x=0..3*Pi/4, coords=polar, scaling=constrained):

#pp1:=pointplot({seq([x/100,sqrt(cos(2*x/100))],x=0..150)});

##pp1:=seq(pointplot( {  [x/100,sqrt(cos(2*x/100)) ],x=0..150}) );

plots[display](pl1, pl2);

#l := {  seq(   point(  [x/100,sqrt(cos(2*x/100))]  ),x=0..150   )  }:

#l := {     point(  [0/100,sqrt(cos(2*0/100))]  ),point(  [2/100,sqrt(cos(2*2/100))]  ),point(  [4/100,sqrt(cos(2*4/100))]  )     }:

L:=11.30:R:=1.538:ext:=.2:

il:=floor(Pi*26-5);

#Lemniscate

#Equation of lemniscate in polar form is r=L*sqrt(cos(2*theta))

 

l:={seq(point([ext+cos(i/100),L*sqrt(cos(2*i/100))*sin(i/100)]),i=-78..il)}:

 

#Cardioid

#Equation of cardioid is r=2*R*(1-cos(theta))

#lc :={seq(  point(  [i/100,2*R*(1-cos(i/100))]  ), i=-ilast..ilast+30  )  }:

 

lc:={seq(point([cos(i/100),2*R*(1-cos(i/100))*sin(i/100)]),i=-4*il/3..il/4  )}:

 

 

plots[display](l,lc, axes=normal, scaling =constrained);

#l := point([0,0], color=green):

#plots[display](l, axes=boxed);

 

 

##pointplot({seq([n,sin(n/10)],n=0..30)});

 

 

printf("             Lemniscate                    Cardioid\n");

 

#ibeg:=convert(-4*il/3, float): iend:=il/4:

ibeg:=  -78:  #floor(-4*il/3):

iend:=floor(il/4):

 

for i from ibeg to iend do

#whattype(i);

xl:=evalf(ext+cos(i/100)): yl:=evalf(L*sqrt(cos(2*i/100))*sin(i/100)):

rr:=evalf(  L*sqrt(  cos(2*i/100)  )):

 

yc:=2*R*(1-cos(i/100))*sin(i/100):

rrc:=2*R*(1-cos(i/100)):

#  printf(" i = %d \n",i);

if type(xl, nonreal) or type(yl, nonreal) then

   printf("i=%d   xl or yl are not real\n", i);

                                          else  

 printf("i=%d   x=%4.3f   y=%4.3f r=%4.3f      yc=%4.3f  r_card=%4.3f\n",i, xl,yl,rr, yc, rrc);

end if;

end do:

Padovan is a British architect, more of whom van be found by googling 'Padovan series'.

  The program below draws the first few equilateral triangles of sides of which are in a series something akin to the Fibonacci sequence.  P(n)=P(n-2)+P(n-3).  It starts 1, 1, 1, 2,...The program below outputs a display of the first few such triangles, but is very klutsy.  It has a "manual input" for the various triangles.  I wondered if there was a quick way of doing this perhaps using theseq command?

  Thanks in advance.  David

 

 

 

 restart:

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

#

#  Padovan

#

#  Series of equilaterla triangles of sides of length:

#  P(n)=P(n-2) + P(n-3)

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

with(plots):

with(plottools):

# etring_up draws an equilateral triangle of side s, pointing up with # [x0,y0] being the coords of the "western most" vertex.

etring_up:=proc(x0,y0,s)

local tt, h:

h:=s*sqrt(3)/2:

tt:=polygon([[x0,y0],[x0+s/2,y0+h],[x0+s,y0]], color=brown, linestyle=1, thickness=1);

plots[display]([tt], scaling=constrained);

end proc:

 

# etring_down draws an equilateral triangle of side s, pointing down

# with [x0,y0] being the coords of the "western most" vertex.

etring_down:=proc(x0,y0,s)

local tt, h:

h:=s*sqrt(3)/2:  #2*s/sqrt(3):

#Only difference between two procs is the minus sign in [x0+s/2,y0-h]

tt:=polygon([[x0,y0],[x0+s/2,y0-h],[x0+s,y0]], color=red, linestyle=1, thickness=1);

plots[display]([tt], scaling=constrained);

end proc:

#etring_down(0,0,2);

#etring_up(0,0,2):

plots[display]([etring_down(0,0,1),etring_up(0,0,1),etring_down(1/2,sqrt(3)/2,1),etring_up(1/2,-sqrt(3)/2,2), etring_down(3/2, sqrt(3)/2,2),etring_up(1/2,sqrt(3)/2,3), etring_down(-2, 2*sqrt(3),4),etring_up(-9/2,-sqrt(3)/2,5),etring_down(-9/2,-sqrt(3)/2,7),etring_up(-1,-4*sqrt(3),9),etring_down(2,2*sqrt(3),12),etring_up(-2, 2*sqrt(3),16),etring_down(-15,10*sqrt(3),21)], scaling=constrained);

First 751 752 753 754 755 756 757 Last Page 753 of 2308