Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

how are please I want to help In some graphs in maple 

the graph in the picture

thank you 

)

Hi,

I will start off with the programming already accomplished. The first part of programming was salvaged from mathexchange whereby I am able to perform combinations with repititions.

 

>with(combinat):
choosing:=proc(n,m,k:=1)
local duplicated:=[seq(op(n),i=1..k)]:
return combinat:-choose(duplicated,m):
end proc:
>choosing([w,b,g],4,4);
[[b, b, b, b], [b, b, b, g], [b, b, b, w], [b, b, g, g], [b, b, g, w], [b, b, w, w], [b, g, g, g], [b, g, g, w], [b, g, w, w], [b, w, w, w], [g, g, g, g], [g, g, g, w], [g, g, w, w], [g, w, w, w], [w, w, w, w]]
 

 

the next step I'm hoping to accomplish is to receive a list giving me a count of each value from each set of combinations. For example, in the first set i have 4 counts of black (b), 0 counts of white (w) and 0 counts of grey (g).  the second set tells me i have 3 counts of b, 0 counts of w and 1 count of g, etc.

the purpose of this is to apply a formula to each set of values.

So I recently bought a new desktop with Windows 10 installed. The problem is hard to describe so I put a picture. This problem occurs randomly (Mostly occurs after I click the right button, when browsing the option in the pop-up toolbar).

When this problem happens, if I move my mouse to any toolbar which suppose to pop-up a toolbar, the pop-up toolbar wont disspear. And ultmately leads to the picture I showned above.

Sorry for the bad explaintion but it is just like I said, it is hard to describe the problem. This PC arrives around Christmas and I downloaded Maple last week. And it never have been normal. This issue also happens to NetLogo (A model simulation software).

I asked DELL's technique services and they did a remote control to help me fix the issue. However, the problem doesn't solved (They worked on this for about 3 hours). It seems the only choice I have is to reinstall the Windows. 

Does anyone have met this problem or know who met it before? Please let me know and I'm really appreciate it.

 

 

Is there a workaround for this?

restart;
int(sqrt(x)*sin(sqrt(3)*ln(x)/2),x)

The answer according to Mathematica is

Maple 2020.2 on windows 10

 

Dear all

I have a nonlinear PDE, I use a transformation depend on some paramaters I would like to find the scalling parameters so that the pde is invariant under the proposed transformation.

PDes_invariant_under_transformation.mw

Thak you for your help 

 

Here is what I'm trying to do. Say I have a Digraph G1 defined by:

with(GraphTheory):
G1:=Digraph([a,b,c],{[[a,b],2],[[b,c],3],[[c,a],4]});

I would like to produce the undirected graph G2, with the same weights:

G2:=Graph([a,b,c],{[{a,b},2],[{b,c},3],[{c,a},4]});

After looking in the GraphTheory package, I found UnderlyingGraph, which seems to do what I want.

Namely,

G3:=UnderlyingGraph(G1,weighted=true);

I had a first problem: there is a bug in the documentation, as the option is 'weights' in the documentation, whereas the source code shows it must be 'weighted'.

 

But then I had another problem, but maybe I didn't understand the purpose of UnderlyingGraph: apparently, I don't get G2. For instance:

 

DijkstrasAlgorithm(G1,a);
            [[[a], 0], [[a, b], 2], [[a, b, c], 5]]

DijkstrasAlgorithm(G2,a);
              [[[a], 0], [[a, b], 2], [[a, c], 4]]

DijkstrasAlgorithm(G3,a);
            [[[a], 0], [[a, c, b], 0], [[a, c], 0]]

The problem seems to come from the weight matrix, which is not symmetric (it is for G2):

WeightMatrix(G3);
                           [0  2  0]
                           [       ]
                           [0  0  3]
                           [       ]
                           [4  0  0]

Edges(G3,weights=true);

{[{a, b}, 0], [{a, b}, 2], [{a, c}, 0], [{a, c}, 4], [{b, c}, 0], [{b, c}, 3]}

 

However, G3 is undirected:

IsDirected(G3);

          false

So, the graph is undirected, but it has different weights for a-b and b-a. Weird.

Now, I am wondering what UnderlyingGraph is supposed to return. After looking at the source code, it seems the statement EW := EW0 + LinearAlgebra:-Transpose(EW0) builds a symmetric weight matrix, but for some reason it's not what is returned.

Is this a bug in the function? Or did I do something wrong? Is there a better way to achieve what I wanted?

 

>(solve(0 < M^2 - 4*m^2, M) assuming (0 < M, 0 < m))

>with(plots):

>inequal(0 < M^2 - 4*m^2, M > 2*m, m = 1 .. 5)

I know that it won't work:

Error, (in plots:-inequal) invalid input: Plot:-Inequality expects its 2nd argument, r1, to be of type name = range(And(realcons, Not(infinity))), but received 2*m < M

I even try

>inequal(0 < M^2 - 4*m^2, m = 1 .. 5, 2*m < M)

But is it possible to do it another way. Could it be an added functionality.

Of course, if I write values like this:

>inequal(0 < M^2 - 4*m^2, m = 1 .. 5, M = 2 .. 10)

I get a plot, a triangle.

 

Hi, 

I have always asked myself this question: why do the colon after the proc(...) statement generate an error if the following statement is local or global?
(the third example is here to show that no error occurs if local is omitted... the warning is of course obvious)

restart:
interface(version);
Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895

f := proc(x) local y: y:=x+1 end proc:

g := proc(x): local y: y:=x+1 end proc:
Error, unexpected `local` declaration in procedure body

h := proc(x): y:=x+1 end proc:
Warning, `y` is implicitly declared local to procedure `h`

TIA

plot(['h'(floor(n))[1], 'h'(floor(n))[2]],n=1..10);
Error, (in plot) ifactors takes an integer or a factored integer

 

h simply uses ifactors. I can calculate with it no problem, e.g., h(3), h(10)... but in plot it does not work. I've tried convert, Integer, etc and nothing works.

Calculation of these integrals takes much time.

Is there a way to reduce the time?

MY_SYSTEM.mw

 

Hi

can anyone help me to solve second order ode, I am unable to find the value of the involved constant of integration

 

ode_solution_help.mw

 

 

 

 

We consider an ellipse  E defined by the equation x²/a²+y²/b²=1. Either F1 and F2 its foci. 
We consider a point M of E  such the angle F1,M,F2 is equal to a given value phi.
Find F1M et F2M in function of a, b and phi . Then find the coordiinates x0 and y0 of M in function of a, b, and phi. Here is the begining of my code;

restart;
_EnvHorizontalName := x: _EnvVerticalName := y:
with(plots):
line := proc (x1, y1, x2, y2) options operator, arrow; (x-x1)*(y2-y1)-(y-y1)*(x2-x1) end proc:
Vdot := proc (U, V) add(U[i]*V[i], i = 1 .. 2) end proc:
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end proc:

ell := x^2/a^2+y^2/b^2 = 1: 
c := sqrt(a^2-b^2):
F1 := [c, 0]: F2 := [-c, 0]:
M := [a*cos(t), b*sin(t)]:
MF2 := simplify(expand(sqrt((c+a*cos(t))^2+(b*sin(t))^2)));
MF1 := simplify(expand(sqrt((c-a*cos(t))^2+(b*sin(t))^2)));
varphi := arccos((MF1^2+MF2^2-4*c^2)/(2*MF1*MF2));
f := unapply(varphi, t);
`max&varphi;` := f((1/2)*Pi);
diff(f(t), t);

a := 7: b := 5: t := (1/3)*Pi:
evalf(varphi);
evalf(MF1); evalf(dist(M, F1));
evalf(MF2); evalf(dist(M, F2));
MF1+MF2; evalf(%);
`max&varphi;`; evalf(%);
ELL := implicitplot(ell, x = -a-2 .. a+2, y = -2-b .. b+2, color = blue):
tp := textplot([[F1[], "F1"],[F2[],"F2"],[M[],"M"]], 'align' = {'above', 'left'}):
po := plot([F1,F2, M], style = point, symbolsize = 15, symbol = solidcircle, color = red):

display([ELL, tp, po], scaling = constrained): Would  you help me to answer the questions ? Thank you.

Hi,

I am studying nonlinear differential equations, and I want to compare software that gives exact solutions to software that gives numerical solutions.

In the attached Maple document, I try to solve a nonlinear ordinary differential equation numerically, but it seems like the numerical solver cannot solve this type of nonlinear ODE.  Are there any numerical solvers in maple that can find a solution to this equation?

 

Steve

Differential_equation_to_solve_numerically.mw

Hello,

I would like to define two vectors in spherical coordinates (preferably using Physics[Vectors] package) such that these two vectors have the magnitudes of r1 and r2, resepctively, but pointing in different directions.

In Physics[Vectors] package, basis vectors _r,_theta,_phi are predefined. So, I cannot define the vectors as r1_:=r1*_r1 and r2_:=r2*_r2 and use all the cool features of physics package.

I will eventually be needing the norm of the difference of these vectors at a later calculation, but this representation turned out to be a problem.

I am avoiding to define these vectors  in cartesian basis with spherical coordinates such as r1_=r1*(sin(theta1)*cos(phi1) i + sin(theta1)*sin(phi1) j + cos(theta1) k), etc. which is a work around. 

How can I do this in Maple?

Thank you.

 

 

 

How can we obtain the expression of the function f : R --> R defined, for each (a, b) such that -oo < a <= b < +oo, by this equality?

Int(f(x), x=a..b) = Int(f(x), x=1/b..1/a)

Replacing x by 1/y in the rhs integral shows that f satisfies this functional equation 

f(y) = f(1/y)/y^2

(note this impose y <> 0, see the PS below)
Functional equations is not y cup of tea and Maple (2015) doesn't seem to have any feature to solve them.
Could anyone explain me how f can be obtained?

PS:
I inadvertently obtained this equality between integrals as I was comparing the performances of different numerical integration methods.
One of the functions in my benchmarks suite had the expression f(x)=1/(1+x^2)... and I "discovered", by changing x to 1/y to ease the numerical integration, that f checked the inequality of the first code snippet.
Thus , for any constant C, C*f  is a solution of the functional equation.
Note that f(x) being strictly positive, 1/y > 0 and the functional equation is always defined.

First 443 444 445 446 447 448 449 Last Page 445 of 2216