Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello People in mapleprimes,

a^k*k/(a*a__0^k)

would not be simplifyed to k*a^(k-1)/a__0^k

with

symplify(a^k*k/(a*a__0^k)) assuming(k>1);

or other commands including expand.

Is there any way other than simplify(numer(..)/a)/simplify(denom(..)/a); ?

Thanks in advance.

 

Hi!

I am trying to solve a large system using solve(). Fortunately, my system is linear and it does have solutions. Actually, the system has free variables that gives multiple solutions.

However, I have hundreds of variables with different names and subscripts, and I only need one solution of the system. I noticed that solve() actually output the solution with the free variables on the right. So, is there a way that I can find all the free variables and give them 0, to get only one set of solution?

Thanks!

William

Using Insert->Table... and inserting information in the cells. 

So I've created Table1 but I can't seem to call any row/column cell information using that name.  How do we do that?  Also, what is the best way to search for information in those cells and return information in adjacent cells? 

In this application you can visualize the impulse generated by a constant and variable force for the interaction of a particle with an object in a state of rest or movement. It is also the calculation of the momentum-momentum equation by entering the mass of the particle to solve initial and final velocities respectively according to the case study. Engineering students can quickly display the calculations and then their interpretation. In spanish.

Plot_of_equation_impulse-momentum.mw

Lenin Araujo Castillo

Ambassador of Maple

Lets say I want to find the intersection point between the line l in parametric form and plane p, both mentioned in the Maple code below. Is there smarter way than using the solve method that I use the two final lines? 

 

with(geom3d);
plane(p, 2*x+y-3*z-3 = 0, [x, y, z]);
                               p
line(l, [-1+3*t, 1+t, 2-t], t);
                               l
intersection(I, p, l);
                               I
solve({x = -1+3*t, y = 1+t, z = 2-t, 2*x+y-3*z-3 = 0}, {t, x, y, z});
                  {t = 1, x = 2, y = 2, z = 1}
 

Hello.

I'd like to plot two coupled functions x=x(t) and y=y(t) given by expression R0 and R1 (see below) for the interval t=0.001..0.999 and then after that extract tha data from the graphs for functions x(t) and y(t).

How can I do that in easiest way?

I will appreciate you.

The procedure "ContractIndices" seems to produce wrong results. This is proved by the following source code, comparing the result of this procedure and a simple direct calculation:

with(DifferentialGeometry):with(Tensor):with(Tools):

DGsetup([x,y],P);
m:=nops(DGinfo("FrameBaseVectors"));
g:=evalDG(1/y^2*dx &t dx+1/y^2*dy &t dy);
CS:=Christoffel(g,"SecondKind");
R0:=CurvatureTensor(CS);
RFc:=ContractIndices(R0,g,[[1,1]]); # Maple Version 2015

# Out of the Help Page: ?Tensor[ContractIndices]
# Form the tensor product T ⊗ S and contract 
# the 1st index of T against the 1st index of S. 
# ContractIndices(T, S, [[1, 1]]);

# Only for comparison: g:= 
# _DG([["tensor", P, [["cov_bas", "cov_bas"], []]], [[
# [1, 1], 1/y^2], 
# [[2, 2], 1/y^2]]]);

# g in table form with all indices, including the zeros: 
g1t:=
table([(1, 1) = 1/y^2, (2, 1) = 0, (1, 2) = 0, (2, 2) = 1/y^2]);

# Only fpr comparison:
# R0:=
# _DG([["tensor", P, [["con_bas", "cov_bas", "cov_bas", "cov_bas"], 
# []]], 
# [
# [[1, 2, 1, 2], -1/y^2], 
# [[1, 2, 2, 1], 1/y^2], 
# [[2, 1, 1, 2], 1/y^2], 
# [[2, 1, 2, 1], -1/y^2]]
# ]);

# R0 in table form with all indices, including the zeros:
R01t:=
table([
(2, 1, 1, 2) = 1/y^2, 
(2, 1, 1, 1) = 0, 
(2, 2, 2, 1) = 0, 
(2, 1, 2, 1) = -1/y^2, 
(1, 1, 1, 2) = 0, 
(1, 2, 2, 2) = 0, 
(1, 2, 2, 1) = 1/y^2, 
(2, 1, 2, 2) = 0, 
(2, 2, 1, 2) = 0, 
(2, 2, 2, 2) = 0, 
(1, 1, 2, 1) = 0, 
(1, 2, 1, 2) = -1/y^2, 
(2, 2, 1, 1) = 0, 
(1, 1, 2, 2) = 0, 
(1, 1, 1, 1) = 0, 
(1, 2, 1, 1) = 0
]);

# Only fpr comparison:
# RFc := 
# _DG([["tensor", P, [["cov_bas", "cov_bas", "cov_bas", "cov_bas"], 
# []]], 
# [
# [[1, 1, 2, 2], 1/y^4], 
# [[1, 2, 1, 2], -1/y^4], 
# [[2, 1, 2, 1], -1/y^4], 
# [[2, 2, 1, 1], 1/y^4]]
# ]);

# RFc in table form with all indices, including the zeros:
RFc1t:=
table(
[(2, 1, 1, 2) = 0, 
(2, 1, 1, 1) = 0, 
(2, 2, 2, 1) = 0, 
(2, 1, 2, 1) = -1/y^4, 
(1, 1, 1, 2) = 0, 
(1, 2, 2, 2) = 0, 
(1, 2, 2, 1) = 0, 
(2, 1, 2, 2) = 0, 
(2, 2, 1, 2) = 0, 
(2, 2, 2, 2) = 0, 
(1, 1, 2, 1) = 0, 
(1, 2, 1, 2) = -1/y^4, 
(2, 2, 1, 1) = 1/y^4, 
(1, 1, 2, 2) = 1/y^4, 
(1, 1, 1, 1) = 0, 
(1, 2, 1, 1) = 0
]);

TestContr:=proc()
    description "Simple contraction";
    local i,j,k,l;
    global RR;
    for i from 1 to m do
        for j from 1 to m do
            for k from 1 to m do
                for l from 1 to m do
                    RR[i,j,k,l]:=add(R01t[r,j,k,l]*g1t[i,r],r=1..m)
                od;
            od;
        od;
    od;
    print(`OK`)
end;

TestContr();

# Result of this:
# RR:=
# table(
# [(2, 1, 1, 2) = 1/y^4, 
# (2, 1, 1, 1) = 0, 
# (2, 2, 2, 1) = 0, 
# (2, 1, 2, 1) = -1/y^4, 
# (1, 1, 1, 2) = 0, 
# (1, 2, 2, 2) = 0, 
# (1, 2, 2, 1) = 1/y^4, 
# (2, 1, 2, 2) = 0, 
# (2, 2, 1, 2) = 0, 
# (2, 2, 2, 2) = 0, 
# (1, 1, 2, 1) = 0, 
# (1, 2, 1, 2) = -1/y^4, 
# (2, 2, 1, 1) = 0, 
# (1, 1, 2, 2) = 0, 
# (1, 1, 1, 1) = 0, 
# (1, 2, 1, 1) = 0
# ]);

Testeq:=proc()
    local i,j,k,l;
    # global
    for i from 1 to m do
        for j from 1 to m do
            for k from 1 to m do
                for l from 1 to m do
    if not (RFc1t[i,j,k,l] = RR[i,j,k,l]) then 
     print([i,j,k,l]) fi;
                od;
            od;
        od;
    od;
end;

Testeq();
# Result of this:
#                          [1, 1, 2, 2]
#                          [1, 2, 2, 1]
#                          [2, 1, 1, 2]
#                          [2, 2, 1, 1]

# No equality for these indices!

Hello,

I have tryed, to run the file ImprovementsInPdsolve.mw with the Mapleversion 2017.3 but in the first example pde[1] I got this error:

Error, (in assuming) when calling 'dsolve'. Received: 'cannot determine if this expression is true or false: not 0 <= -(1/2)*Pi'


 pde[2],  pde[3] and others are o.k. but pde[4] to pde[6] not. Can You give me a hint what's wrong?

With kindly regards

Wolfgang Gellien

 

How to plot phase portrait on a cylinder for The Lotka–Volterra equations (for some definite α, β, γ, δ):

{\begin{aligned}{\frac {dx}{dt}}&=\alpha x-\beta xy\\[6pt]{\frac {dy}{dt}}&=\delta xy-\gamma y\end{aligned}}

 

 

I have a ploblem here:

plots[changecoords](subs(CURVELIST = CURVES, DEplot3d({(diff(rho(t), t))*(cos(varphi))(t)+rho(t)*(diff((cos(varphi))(t), t)) = 0.1*rho(t)*(cos(varphi))(t)-0.8e-4*rho(t)^2*(cos(varphi))(t)*(sin(varphi))(t), (diff(rho(t), t))*(sin(varphi))(t)+rho(t)*(diff((sin(varphi))(t), t)) = 0.4e-4*rho(t)^2*(cos(varphi))(t)*(sin(varphi))(t)-0.4e-1*rho(t)*(sin(varphi))(t)}, [rho(t), varphi(t)], t = 0 .. 2*Pi, [[rho(0) = 1, varphi(0) = 0]], scene = [rho, varphi, t])), cylindrical);
Error, (in DEtools/DEplot/CheckDE) only derivatives of dependent variables can be present
 

Thank you for the help.

hi everybody i am beginner in maple, i want to maximize this equation:

(k[m]*a-(a*r*k[m]-a*k[m]-b*c-b*c[m])/(2*(-1+r)))*((1-r)*(a*r*k[m]-a*k[m]-b*c-b*c[m])/(2*b*(-1+r))-c-c[m])

subject to constraints:

a > 0, b > 0, c > 0, r > 0, k[m] > 1, k[m]*a > (a*k[m]*(-1+r)-b*(c+c[m]))/(2*(-1+r)), a >= b*c, r < 1, a/b < (c[m]+c[r])/(k[m]*(-1+r)-r+1), a/b < (c+c[m])/(k[m]*(-1+r)), (c+cm)*b+a*k[m]*(-1+r) < 0

is it possible? if it is not, i want to know that equation could be positive or not and in what range of variables it could be positive?

if S:=V*t then find the filling time for decreasing in velocity ?? distanc2 = 200 mm  decrease velosity 0.58 to 0.06nmm/s find time ?

This is my first post here, and any help is really appreciated.

I have two complex polynomials 

f(w)= w^8+w^6+4*w^4+w^2+1 , and 

g(w)= w^16+2*w^14+9*w^12-2*w^10+44*w^8-2*w^6+9*w^4+2*w^2+1 .

I want to plot the roots of f in blue, roots of g in red and a unit circle in black at the same picture. 

Thanks in advance for your help.

There are two questions:

 

1. I have an ODE system solved numerically, but it has a singularity at Pi because of cot(x). I need to know whether the solution goes to infinity at this point or it has some value. I tried the limit operation, but it doesn't seem to work. Am I doing it wrong or is there no way to do such thing? See details in file 1 1.mw.

I know I can evaluate the function at point Pi - 10^(-10), Pi - 10^(-9) etc, and it has really close values there, but still I doubt it is a strong proof of the function not going to infinity.

Also the following "technical" question: why is Maple building the plot from 0 to Pi (or from -Pi to Pi symmetrically), even if I enter different range? For cot(x) it builds the plot normally, not just from -Pi to Pi, althouth cot(x) has singularity at Pi AND at 0, but my plots are somehow broken off at Pi.

 

2. I have 2 similar procedures and I need the plots of both of them. But first plot is built correctly and for the second there appears an error: "Error, (in plot) procedure expected, as range contains no plotting variable". I tried entering other ranges, including very small ones, but it didn't help. It calculates the values at points of range nicely though. See details in file 2 2.mw.

And one more time "technical" question about warnings in the procedures. I tried typing "local" or "global" before variables, but Maple gives me an error. How do I get rid of the warnings correctly?

 

I know it is difficult to see into those problems, but I strongly look for help! Thank you for your time!

As the title states, i want to have an automated logging occur of the details of the executions, including code content, origin worksheet,date the execution was attempted. I think i know a way to do it but id prefer if there was an option that already exists in the maple interface

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