tomleslie

5028 Reputation

15 Badges

9 years, 218 days

MaplePrimes Activity


These are replies submitted by tomleslie

@Preben Alsholm 

On 64-bit Windows 7, I just updated to Physics 428.

The pop-up showed the usual progress bar, and the associated annotation reported "downloading"," installing" then "Done!".

Subsequent Physics:-Version() check in Maple gave the message

`The "Physics Updates" version in the MapleCloud is 428 and is the same as the version installed in this computer, created 2019, September 22, 7:8 hours, found in the directory C:\\Users\\TomLeslie\\maple\\toolbox\\2019\\Physics Updates\\lib\\`

as expected.

So I had no issues with this update

@minhhieuh2003 

was introducd in Maple 2015, and updated in Maple 2016. Exactly what version are you using?

@Jayaprakash J 

so you will have to specify the requirement more clearly.

Possibly??? the command

P:=unapply(doDiff(f,x,n),n);

@Melvin Brown 

This is the same error message which I obtained in a earlier post - and I suggested why this error message might occur. Try reading my earlier post

@Subhan331 

Questions on this site only get an answer in Maple code. If you want an answer in Matlab code, then post on

https://uk.mathworks.com/matlabcentral/answers

If you have a Maple problem in Maple code, then post the code here

"fminsearch" is a Matlab command to "Find minimum of unconstrained multivariable function using derivative-free method"

Why are you posting Matlab problems on a Maple forum??

"Exactly what is the problem???"

Your answer that " I think time-series result ( i mean graph) is incorrect?" isn't making it!!

On what mathematical basis do you think the solution provided by Maple is incorrect??

When I look at the 3D result provided by Maple, ie C(x,t) as a function of x and t, the only thing that looks  *slightly* suspicious is the region around C(1,0). The value at C(1,0) is forced to be 1 by the supplied ICs/BCs, but this value changes very rapidly (one might almost say "discontinuously") as (x,t) move even slightly from (1,0). This would make me double-check whether the relevant boundary/initial condition is "correct"

Otherwise I see no reason to doubt the result which Maple provides
 

The code in the image you supply is "cheating" becuase the expressions you supply for 'c' and 'd' mean two completely different things, and are certainly not equivalent

See the attached

a := (ui-uf)/lambda

(ui-uf)/lambda

(1)

b := delta*a

delta*(ui-uf)/lambda

(2)

c := expand(a*b)

delta*uf^2/lambda^2-2*delta*ui*uf/lambda^2+delta*ui^2/lambda^2

(3)

d := ui*delta*ui(1/lambda^2)-ui*delta*uf(1/lambda^2)-uf*delta*ui(1/lambda^2)+uf*delta*uf(1/lambda^2)

ui*delta*ui(1/lambda^2)-ui*delta*uf(1/lambda^2)-uf*delta*ui(1/lambda^2)+uf*delta*uf(1/lambda^2)

(4)

#
# Convert the above to 1-D input for illustration
#
# Note that the code contains the variable 'names'
# ui and uf, but also the 'functions' ui() and uf()
# with arguments (1/lambda^2).
#
# Maple consider the name 'ui' and the function 'ui()'
# to be two completely different entities
#
# The function definitions occur because there is
# no multiplication (explicit or implicit) in a
# subexpression like ui(1/lambda^2)
#
# Check what happens when these multiplications are
# added
#
  d := ui*delta*ui(1/lambda^2) - ui*delta*uf(1/lambda^2) - uf*delta*ui(1/lambda^2) + uf*delta*uf(1/lambda^2);
  d := ui*delta*ui*(1/lambda^2) - ui*delta*uf*(1/lambda^2) - uf*delta*ui*(1/lambda^2) + uf*delta*uf*(1/lambda^2);

ui*delta*ui(1/lambda^2)-ui*delta*uf(1/lambda^2)-uf*delta*ui(1/lambda^2)+uf*delta*uf(1/lambda^2)

 

delta*uf^2/lambda^2-2*delta*ui*uf/lambda^2+delta*ui^2/lambda^2

(5)

 


 

Download notEquiv.mw

 

@acer 

"You could try testing whether StringTools:-Search returns a result greater than 1."

I think I'd check whether StringTools:-Search returns a result greater than 0

Is the random selection of symbols in the worksheet you supply intended to do anything useful?

If so: what, exactly?

@minhthien2016 

which is (more-or-less) a combination of the two worksheets I have previously supplied

  restart;

  with(geometry):

#
# Define the sidelengths
#
  sa, sb, sc, ab, bc, ac:= 3,5,7,3,4,5:

#######################################################
# Define three points which will become the base triangle.
#
# Without loss of generality one can specify
#
# 1. point A2D is at the origin
# 2. point B2D is along the +ve x-axis
# 3. point C2D is in the x-y plane, with positive
#    y-coordinate
#
  point( A2D,
         [0, 0]
       ):
  point( B2D,
         [x__b, 0]
       ):
  point( C2D,
         [x__c, y__c]
       ):
#
# Using the given side lengths, solve the distance
# equations, to obtain (and assign) the unknown
# coordinates x__b, x__c, y__c
#
  sol:=  assign
         ( solve
          ( [ x__b > 0,
              y__c > 0,
              distance(A2D,B2D)=ab,
              distance(A2D,C2D)=ac,
              distance(B2D,C2D)=bc
            ]
          )
        ):
  triangle(T1, [A2D,B2D,C2D]):
#
# Get the circumcircle for the triangle and generate
# the directed line segment between the centre of this
# circumcircle and the origin
#
  circumcircle(cc2d, T1):
  dsegment( ds,
            point
            ( CS,
              coordinates
              ( center
                ( cc2d
                )
              )
            ),
            point
            ( O2,
              [0,0]
            )
          ):
#
# Translate the circumcircle so that the centre
# is at the origin. Translate the triangle by the
# same amount
#
  translation( cc2d_trans,
               cc2d,
               ds
             ):
  triangle( T1_trans,
            [ translation
              ( A2D_trans,
                A2D,
                ds
              ),
              translation
              ( B2D_trans,
                B2D,
                ds
              ),
              translation
              ( C2D_trans,
                C2D,
                ds
              )
             ]
          ):
  draw( [T1_trans, cc2d_trans]);
#
# Convert the coordinates of the triangle in 2D
# to 3D, just by adding a '0' for the z-coorcinate.
# These coordinates will be used later
#
# Unload the geometry package, ready for loading
# the geom3d package
#
  cA:=[coordinates(A2D_trans)[],0];
  cB:=[coordinates(B2D_trans)[],0];
  cC:=[coordinates(C2D_trans)[],0];
  unwith(geometry):
 

 

[-3/2, -2, 0]

 

[3/2, -2, 0]

 

[3/2, 2, 0]

(1)

  with(geom3d):
#
# Specify the coordinate system
#
  _EnvXName:='x':
  _EnvYName:='y':
  _EnvZName:='z':
#
# Define the points for the tetrahedron. Note that
# the coordinates for the points A, B, C are obtained
# by solving the 2D problem above
#
  point(A, cA):
  point(B, cB):
  point(C, cC):
  point(S, [xs, ys, zs]):
#
# Using the supplied distances, solve for the coordinates
# of the "unknown" point S
#
  sol:=  assign
         ( solve
          ( [ zs>0,
              distance(S,A)=sa,
              distance(S,B)=sb,
              distance(S,C)=sc
            ]
          )
        ):
#
# Define a general tetrahedron based on the points A, B, C, S
# where by construction A,B,C will lie in the x-y plane, and
# the origin will be the centre of the circumcircle of the
# triangle ABC
#
   gtetrahedron(tet,
                [A,B,C,S]
               ):
   draw(tet, axes=boxed, scaling=constrained);
   detail(tet);

 

Geom3dDetail(["name of the object", tet], ["form of the object", gtetrahedron3d], ["the 4 vertices", [[-3/2, -2, 0], [3/2, -2, 0], [3/2, 2, 0], [-8/3, -3, (1/6)*sqrt(239)]]], ["the 4 faces", [[[-3/2, -2, 0], [3/2, -2, 0], [3/2, 2, 0]], [[-3/2, -2, 0], [3/2, -2, 0], [-8/3, -3, (1/6)*sqrt(239)]], [[-3/2, -2, 0], [3/2, 2, 0], [-8/3, -3, (1/6)*sqrt(239)]], [[3/2, -2, 0], [3/2, 2, 0], [-8/3, -3, (1/6)*sqrt(239)]]]])

(2)

#
# The four points A, B, C, S of the tetrahedron generated
# above all lie on a sphere. Generate this sphere
#
  sphere( S1,
          [A, B, C, S],
          centername=c1
        ):
#
# Produce the directed line segment between the centre of
# this sphere and the origin
#
  dsegment( ds1,
            [ point(T, coordinates(c1)),
              point(OO, [0,0,0])
            ]
          ):
#
# Translate the sphere above to the origin.
# Translate the embedded tetrahedron by the sam amount
#
  translation( Ttet, tet, ds1):
  translation( S2, S1, ds1):
#
# Output details of the translated tetrahedron and sphere
# Note that this construction is not unique. Any rotation
# by any angle about any of the 'x', 'y', 'z'-axes is
# equally valid
#
  detail(Ttet);
  detail(S2);
#
# Draw both
#
  draw( [ Ttet(color=blue, style=surface),
          S2(color=red, transparency=0.8, style=surface)
        ],
        axes=boxed,
        scaling=constrained,
        labels=["x", "y", "z"],
        labelfont=[times, bold, 16]
      );

Geom3dDetail(["name of the object", Ttet], ["form of the object", gtetrahedron3d], ["the 4 vertices", [[-3/2, -2, -(99/478)*sqrt(239)], [3/2, -2, -(99/478)*sqrt(239)], [3/2, 2, -(99/478)*sqrt(239)], [-8/3, -3, -(29/717)*sqrt(239)]]], ["the 4 faces", [[[-3/2, -2, -(99/478)*sqrt(239)], [3/2, -2, -(99/478)*sqrt(239)], [3/2, 2, -(99/478)*sqrt(239)]], [[-3/2, -2, -(99/478)*sqrt(239)], [3/2, -2, -(99/478)*sqrt(239)], [-8/3, -3, -(29/717)*sqrt(239)]], [[-3/2, -2, -(99/478)*sqrt(239)], [3/2, 2, -(99/478)*sqrt(239)], [-8/3, -3, -(29/717)*sqrt(239)]], [[3/2, -2, -(99/478)*sqrt(239)], [3/2, 2, -(99/478)*sqrt(239)], [-8/3, -3, -(29/717)*sqrt(239)]]]])

 

Geom3dDetail(["name of the object", S2], ["form of the object", sphere3d], ["name of the center", center_S2_1], ["coordinates of the center", [0, 0, 0]], ["radius of the sphere", (2/239)*235654^(1/2)], ["surface area of the sphere", (15776/239)*Pi], ["volume of the sphere", (31552/171363)*Pi*235654^(1/2)], ["equation of the sphere", -3944/239+x^2+y^2+z^2 = 0])

 

 

 

 

Download tetFun3.mw

This OP's questions have a habit of "disappearing" after answers has been posted

In an undirected graph with three vertices A, B, C and two edges AB, BC, the "longest" path is obviously infinite!. One just follows the route A->B->A>B->A>B->A>B->A>B->A>B->A>B->A>B........infinite times......->C

A similar arguemnt can be applied to the term "longest" cycle.

So what exactly do you mean by "longest path" and "longest cycle"

It seems possible to generate at least two "different" answers for this problem - see the attached
I have no idea which is correct (except that I agree the answer cannot be negative)


 

restart:

with(Statistics):
X := RandomVariable(Normal(1, sqrt(2.25))):
int(PDF(X, x)*Heaviside(x^7-5*x^4-3*x+1), x = -infinity .. infinity);

-0.8507120131e-1

(1)

evalf(Int(PDF(X, x)*Heaviside(x^7-5*x^4-3*x+1), x = -infinity .. infinity));

.5275852105

(2)

 


 

Download intProb.mw

@acer 

Same problem with the variable 'f', which is used in both indexed and un-indexed form

One really should never use a simple variable name (liek 'f' or 'theta') and indexed versions of the same names like (f[i] or thets[i]) and expect these to be "independent" - they are not

1 2 3 4 5 6 7 Last Page 1 of 145