MaplePrimes Questions

If A then B After clustering B , how to find a set of A in machine learning topic and fuzzy topic?

Hi Guys,

I need help regarding simplifying definite integrals. I have following expression

2*s^2*(int(Phi[1, 1](x, T[2])*(diff(Y1(x), x, x)), x = 0 .. x1))+int(Phi[1, 1](x, T[2])*(diff(Y1(x), x, x, x, x)), x = 0 .. x1)-omega_y^2*(int(Y1(x)*Phi[1, 1](x, T[2]), x = 0 .. x1))

As we can notice the limit for each integral is same, so I should be able to take these integral limit outside. I am trying to use collect and simplify, but both of these command are not working. It would be really helpful for me if I can get the solution for it.

Please find the attached example sheet also.example.mw

With Regards

Sunit

 

Maple's plot3d makes nice plots, but it is not quite polished enough I feel.

When I compared the same plot with what I get with Mathematica, I found these 3 issues shown below. I am not too good in Maple, so I am not able to see how to improve on this any more.

 

 

The Maple code is

restart;
f:=-x^4-2*y^4+14*x^2*y^2/5:
plot3d(f, x=-5..5,y=-5..5,
   axes     = boxed,
   axesfont = [Times,default,10],
   axis[1]  = [tickmarks=[3,subticks=5]],
   axis[2]  = [tickmarks=[3,subticks=5]],
   axis[3]  = [tickmarks=[3,subticks=5]],
   labeldirections = [horizontal, horizontal, horizontal],	
   labels   = ['x', 'y', 'z'],
   scaling  = unconstrained) 

Compare to Mathematica's output

 

f = -x^4 + (14*x^2*y^2)/5 - 2*y^4; 
Plot3D[f, {x, -5, 5}, {y, -5, 5}, 
 AxesLabel -> {"x", "y", "z"}, 
 PlotRange -> All, 
 BoxRatios -> {1, 1, 1}, ImageSize -> 400]

Another major limitation in Maple's plot3d, is that it does not support `BoxRatios` like option. I asked about this years ago and got help on it, but nothing very satisfactory to use in geneal.

https://www.mapleprimes.com/questions/217092-How-To-Change-box-Ratio-Or-3D-Aspect

I hope Maplesoft can improve on this in next version.

Any suggestion how to improve the above 3 issues for now? The ticks issues for me seems the most annoying, becuase they keep moving around as I rotate the 3d plot.

 

Maple 2020 on windows 10

Dear all

I need your help to compute the discrete convolution product. Is there a simple way in maple that hep me to compute the coefficient of the matrix g 

thanks

convolution.mw

 

 

Hi, 

I represent 3 thin parallel slices of colors red, green and blue; all have the same transparency equal to 0.5
For the default orientation of the display, the blue slice is on the forefront, the red one in the background and the green one in beween. Then the blue slice is "bluer" than green and  the green one "greener" than red (FIG 1)
If you rotate manually the figure in order to place the red slice in the forefront and the blue one in the background, you expect to have the red slice "redder" than the green one and the green one "greener" than the blue one (FIG 2)
This is not the case.

The order in which the slices appear in the PLOT3D command defines the foreground and the background, but these latter are not dynamically recalculated when the figure is rotated.
To recover the correct colors one must revert the order of the slices in PLOT3D (FIG 3)

Are we comdamned to change to change manually the order of the slices in PLOT3D or does it exist an option whixh avoids doing so?

Don't pay too much attention to the plots above for the foreground is strangely correct on figure 2 ???

restart

with(plottools):

alpha := Pi/18.:
a := 2*cos(alpha):
b := 2*sin(alpha):
e := 0.02:
p := [[0,0,0],[a,b,0],[a,b,1],[0,0,1]],
     [[0,e,0],[a,b+e,0],[a,b+e,1],[0,e,1]],
     [[0,0,0],[0,e,0],[0,e,1],[0,0,1]],
     [[a,b,0],[a,b+e,0],[a,b+e,1],[a,b,1]],
     [[0,0,0],[a,b,0],[a,b+e,0],[0,e,0]],
     [[0,0,1],[a,b,1],[a,b+e,1],[0,e,1]]

[[0, 0, 0], [1.969615506, .3472963554, 0], [1.969615506, .3472963554, 1], [0, 0, 1]], [[0, 0.2e-1, 0], [1.969615506, .3672963554, 0], [1.969615506, .3672963554, 1], [0, 0.2e-1, 1]], [[0, 0, 0], [0, 0.2e-1, 0], [0, 0.2e-1, 1], [0, 0, 1]], [[1.969615506, .3472963554, 0], [1.969615506, .3672963554, 0], [1.969615506, .3672963554, 1], [1.969615506, .3472963554, 1]], [[0, 0, 0], [1.969615506, .3472963554, 0], [1.969615506, .3672963554, 0], [0, 0.2e-1, 0]], [[0, 0, 1], [1.969615506, .3472963554, 1], [1.969615506, .3672963554, 1], [0, 0.2e-1, 1]]

(1)

f   := k -> transform((x, y, z) -> [x, y+k, z]):
col := k-> COLOR(RGB, op(ListTools:-Rotate([1, 0, 0], -k))):
t   := TRANSPARENCY(0.5):
PLOT3D(POLYGONS(p, t, col(0)), f(1)(POLYGONS(p, t, col(1))), f(2)(POLYGONS(p, t, col(2))), AXESLABELS(2, 3, 1))

 

PLOT3D(POLYGONS(p, t, col(0)), f(1)(POLYGONS(p, t, col(1))), f(2)(POLYGONS(p, t, col(2))), AXESLABELS(2, 3, 1))

 

PLOT3D(f(2)(POLYGONS(p, t, col(2))), f(1)(POLYGONS(p, t, col(1))), POLYGONS(p, t, col(0)), AXESLABELS(2, 3, 1))

 

 


 

Download Background_Foreground.mw

Is that possible ? Or do I need a seperate compiler?

Hello everyone.

I've took part in a math competition and we use Maple 15 as software to solve the various problems. We, apart from solving the problems, to correct and give a score to 4 other participants per problems. We have to download their solution and read it and then valuate it. However one of the files is .maple and not .mw. How can I open it? The tutors said to us that we just have to change extension and copy-paste the content into another document, but the the program doesn't let me copy the text (it's a mess) because "it's too big to be copied". I have obviously asked them how to solve this since what they said isn't working, but they didn't answer...

So, does anyone know how I could convert a file from .maple to .mw and still see the document as it was intended?

I would like to be able to calculate 3D vector dot products using the spherical coordinate system, but so far I have not been sucessful.  A few suggestions would be greatly appreciated!

These are my failed attempts:
 

Calculating dot products using spherical coordinatesNULL

With Physics Vectors

 

with(Physics[Vectors])

Setup(mathematicalnotation = true)``

Setup(coordinatesystems = spherical)

[coordinatesystems = {X}]

(1.1)

k_ := _phi*c+_r*a+_theta*b

_phi*c+_r*a+_theta*b

(1.2)

k_.k_

a^2+b^2+c^2

(1.3)

I was hoping for the dot product to be calculated using the spherical coordinate system, but this is the cartesian dot product.

NULL

With Vector Calulus

 

restart

with(VectorCalculus)``

SetCoordinates('spherical'[r, phi, theta])

spherical[r, phi, theta]

(2.1)

``

k := VectorField([a, b, c], coords = spherical[r, phi, theta])

Vector(3, {(1) = a, (2) = b, (3) = c})

(2.2)

k.k

a^2+b^2+c^2

(2.3)

This is also the cartesian dot product.

NULL


 

Download Calculating_dot_products_using_spherical_coordinates.mw

If I am running Windows is there any way to make Maple see the directory of an external program like for instance Geogebra? 

I have tried with

file := fopen("inputfile.ggb",WRITE, TEXT);

execute; fprintf(file, "line((2,3),(4,6)\n");
close(file);
 system[launch]("Geogebra.exe testfile.ggb"); 

Where line is a command in Geogebra, to draw a straight line.  

But I get an error where Maple claims it cannot see Geogebra. 

Any idea how to fix this?  

Hi Guys,

It might be a very basic question, but I am struggling with it for a quite a time.  I have an expression in a form of

f(x)=h(x)+g(x);

and I want to use factor operation elementwise, i.e., it can individually act on h(x) and can give me

f(x)=h1(x)*h2(x)+g1(x)*g2(x). But whenever I am putting factor operation with elementwise it is not giving me desired answer. It would be really helpful and great if someone can help me out.

I am attaching maple sheet for reference also.

Thanks in advance and regards

Sunit.
example.mw
Download example.mw

 

`assuming`([dsolve({a3(0) = 0, diff(a3(z), z) = -K*a10*a20*sqrt(1-a3(z)^2/a10^2)*sqrt(1-a3(z)^2/a20^2)})], [positive])

which returns

a3(z) = -JacobiSN(z*a10*K, a20/a10)*a20

While in Mathematica, it yields a different solution:

a3(z) = -JacobiSN(z*a10*K, a20^2/a10^2)*a20

Which is right?

Thanks in advance.

Hi,

Consider the following planar dynamical system(PDS) with parameters r, p1, s, n:
a:=(r+1)*(1+p1*s)/(2*(1-P1))-1/(n^2);
b:=(r+1)*(3-r)*(1-p1*s^2)/(8*(1-p1))-3/(2*n^4);
c:=(r+1)*(3-r)*(5-3*r)*(1+p1*s^3)/(48*(1-p1))-5/(2*n^6);
 

 

Hi,

I am using Direct Search Optimisation package to minimize a function however I am trying to define an equality constraint for it, but I am facing a problem when I run it. Please see the code below.

    result := DirectSearch:-Search(CHWP,[sum(d[i], i = 1 .. 7)  = 220], variables = [d = Vector(7)], assume =nonnegint,
            strategy = globalsearch, method = cdos, evaluationlimit = 10000, objectivetarget = 10^(-10));

CHWP is the name of my procedure which works with any other type of constraint. d is my variable which I have defined as a vector. when I run this it starts with different combination of numbers for d[i]s however the error comes in when it all of a sudden assigns some numbers to d[i]s which their sum exceeds the limit which I have defined (220) in this case and when this happens the procedure will give an error which is normal for the function which I have defined since a number bigger than 220 does not make sense in this case. I would be glad if you can help me with this. Many thanks.

 

I'm using Maple to solve academic problems.
At a certain stage, I need a loop to perform numerical calculations, from where I extract a graph. However, each step takes a long time and therefore, I would like to evaluate the performance of the result at each step of time.
To simulate my calculation, I created a test code:

restart:                                                                  # Restart
with(Threads):                                                      # To use Sleep()
a := 2*((ceil(rand()/10^10)-50)*(1/10)):                # Random Value
b := 2*(ceil(rand()/10^10)-50):                             # Random Value
c := 2*ceil(rand()/10^10)-100:                             # Random Value
f := proc (x) options operator, arrow; a*x^2+b*x+c end proc;                  # Generic function that i'm ploting.
np := 10:                                                              # Number of Points i'm ploting
vmax := 10:                                                         # Maximum funcxtion value
VAR1 := Matrix(np+1, 2, proc (m, n) options operator, arrow; if n = 1 then (m-1)*vmax/np else 0 end if end proc):       # Declaring VAR1 as a "null" matrix

for i to np+1 do                                                  # Loop Start
VAR1[i, 2] := f((i-1)*vmax/np):                           # VAR1 value update
print(plot([VAR1], x = 0 .. vmax,  gridlines)):                           # Ploting VAR1
Sleep(.25):                                                         # Simulating longer processing time
od;

 

However, all graphs are displayed simultaneously after the last step of the for loop.
I would like to print the result (output) after each time step, plotting a new graph for each time an iteration ends.
Would anyone know how to do this?


Thank you for your help.

 

Hi,

fsolve( [Eq1, Eq2, Eq3, Eq4], {x, y}) is not possible since the number of variables are less than number of equations. Are there other ways to solve simultaneous equations?

 

Thanks,

Baharm31

 

First 557 558 559 560 561 562 563 Last Page 559 of 2426