Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Hello,

In my code, I need to use 2 packages :
- with(LinearAlgebra)
- with(ListTools)

Problem :
It seems that the package with(ListTools) creates some troubles/ conflicts when I use some functions of the LinearAlgebra package such as DotProduct.

Here a small example to illustrate my issue

with(LinearAlgebra):
with(Student[MultivariateCalculus]):
with(plots):
with(MathML):
DotProduct(<0,0,l>, <0,0,l>, conjugate = false);

--> This code works

with(LinearAlgebra):
with(Student[MultivariateCalculus]):
with(plots):
with(MathML):
with(ListTools):
DotProduct(<0,0,l>, <0,0,l>, conjugate = false);

--> This code doesn't work

I try to replace the line with the DotProduct by the following line but it still doesn't work

with(LinearAlgebra):-DotProduct(<0,0,l>, <0,0,l>, conjugate = false));

 

How can I do to use in my code both packages (LinearAlgebra and ListTools) ?

Thanks a lot for your help

 when send email to technical support of maple?

i would like to encrypt email content with maple public key in gmail

using the code generator assistant I entered the following function

p := proc (z::(float[8]))

local a::integer, accm::(float[8]), k::integer, k1::(float[8]), c;
c := Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], order = C_order, datatype = float[8]);
k1 := 1;
c[1] := evalf(sqrt(2*Pi));
a := 12;
for k to a-1 do c[k+1] := evalf(exp(a-k)*(a-k)^(k-1/2)/k1); k1 := -k1*k end do;
accm := c[1];
for k to a-1 do accm := accm+evalf(c[k+1]/(z+k)) end do;
accm := accm*evalf(exp(-z-a)*(z+a)^(z+1/2));
return accm/z
end proc

the code-generated julia code follows

function input(z)
c = [0,0,0,0,0,0,0,0,0,0,0,0]
k1 = 1
c[0] = (sqrt(2 * pi))
a = 12
for k = 1:a - 1
c[k] = (exp(a - k) * (a - k) ^ (k - 1//2) / k1)
k1 = -k1 * k
accm = c[0]
for k = 1:a - 1
accm = accm + (c[k] / (z + k))
accm = accm * (exp(-z - a) * (z + a) ^ (z + 1//2))
return(accm / z)
end

two things are wrong

1: no end after loop end

2: array index starts at 0, it should be 1 and of course the array references should reflect that

 

btw, it would be nice to be able to enter code tags like [code] code here [/code]

OnesM:=Matrix(`%id`=119376536)

 

Anyone can solve this??

 

 

Many thanks!

Hi guys,
I want to import symbolic matrix from matlab to Maple, How I can do that ? 


I'm running calculations like this:

    N:=10000;
    f := (i,j)-> (some complicated procedure depending on i and j);
    M:= Matrix([Threads:-Seq([Threads:-Seq( f(i,j), j=1..N)], i=1..N)]);

I have a server with 20 cores, but each core has two threads, so this code should max out all 40 threads. But what I notice is only at most 20 threads being used at a time. 

I checked kernelopts(numcpus) returns 20. 

Does anyone have any advice on how to maximize my resource usage?

Hello,

Still on the thematic on simplification of trigonometric expression.

I would like to simplify this equation. Normally, for a mecanical point of view, this equation could be simplified a lot and namely the psi[1](t) and theta[1](t) variables should disappear.

The difference with the former posts is the fact that now each term (for example  2*sin(gamma0(t))*z0(t)*cos(beta0(t))*xb[1]) can regroup 2 terms in factor with the trigonometric part.

eq:=l2[1]^2 = 2*sin(gamma0(t))*z0(t)*cos(beta0(t))*xb[1]-2*sin(gamma0(t))*zp[1](t)*cos(beta0(t))*xb[1]+2*sin(gamma0(t))*y0(t)*sin(alpha0(t))*zb[1]-2*sin(gamma0(t))*yp[1](t)*sin(alpha0(t))*zb[1]+2*sin(gamma0(t))*x0(t)*cos(alpha0(t))*zb[1]-2*sin(gamma0(t))*xp[1](t)*cos(alpha0(t))*zb[1]-2*cos(gamma0(t))*z0(t)*cos(beta0(t))*zb[1]+2*cos(gamma0(t))*zp[1](t)*cos(beta0(t))*zb[1]+2*cos(gamma0(t))*y0(t)*sin(alpha0(t))*xb[1]-2*cos(gamma0(t))*yp[1](t)*sin(alpha0(t))*xb[1]+2*cos(gamma0(t))*x0(t)*cos(alpha0(t))*xb[1]-2*cos(gamma0(t))*xp[1](t)*cos(alpha0(t))*xb[1]+2*y0(t)*cos(alpha0(t))*cos(beta0(t))*yb[1]-2*yp[1](t)*cos(alpha0(t))*cos(beta0(t))*yb[1]-2*x0(t)*sin(alpha0(t))*cos(beta0(t))*yb[1]+2*xp[1](t)*sin(alpha0(t))*cos(beta0(t))*yb[1]-2*sin(psi[1](t))*cos(theta[1](t))*l3[1]*xb[1]+2*sin(psi[1](t))*sin(theta[1](t))*l3[1]*zb[1]-2*cos(theta[1](t))*cos(psi[1](t))*l3[1]*zb[1]-2*cos(psi[1](t))*sin(theta[1](t))*l3[1]*xb[1]-2*sin(gamma0(t))*y0(t)*sin(alpha0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]-2*sin(gamma0(t))*yp[1](t)*sin(alpha0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]+2*sin(gamma0(t))*yp[1](t)*sin(alpha0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]+2*sin(gamma0(t))*x0(t)*cos(alpha0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]-2*sin(gamma0(t))*x0(t)*cos(alpha0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]-2*sin(gamma0(t))*xp[1](t)*cos(alpha0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]+2*sin(gamma0(t))*xp[1](t)*cos(alpha0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]-2*cos(gamma0(t))*z0(t)*cos(beta0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]+2*cos(gamma0(t))*z0(t)*cos(beta0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]+2*cos(gamma0(t))*zp[1](t)*cos(beta0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]-2*cos(gamma0(t))*zp[1](t)*cos(beta0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]-2*cos(gamma0(t))*y0(t)*sin(alpha0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]-2*cos(gamma0(t))*y0(t)*sin(alpha0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]+2*cos(gamma0(t))*yp[1](t)*sin(alpha0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]+2*cos(gamma0(t))*yp[1](t)*sin(alpha0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]-2*cos(gamma0(t))*x0(t)*cos(alpha0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]-2*cos(gamma0(t))*x0(t)*cos(alpha0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]+2*cos(gamma0(t))*xp[1](t)*cos(alpha0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]+2*cos(gamma0(t))*xp[1](t)*cos(alpha0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]+yb[1]^2+xb[1]^2+zb[1]^2+l3[1]^2+z0(t)^2+zp[1](t)^2+y0(t)^2+yp[1](t)^2+x0(t)^2+xp[1](t)^2+2*z0(t)*sin(beta0(t))*yb[1]-2*zp[1](t)*sin(beta0(t))*yb[1]-2*z0(t)*zp[1](t)-2*y0(t)*yp[1](t)-2*x0(t)*xp[1](t)-2*sin(gamma0(t))*y0(t)*cos(alpha0(t))*sin(beta0(t))*xb[1]+2*sin(gamma0(t))*yp[1](t)*cos(alpha0(t))*sin(beta0(t))*xb[1]+2*sin(gamma0(t))*x0(t)*sin(alpha0(t))*sin(beta0(t))*xb[1]-2*sin(gamma0(t))*xp[1](t)*sin(alpha0(t))*sin(beta0(t))*xb[1]+2*cos(gamma0(t))*y0(t)*cos(alpha0(t))*sin(beta0(t))*zb[1]-2*cos(gamma0(t))*yp[1](t)*cos(alpha0(t))*sin(beta0(t))*zb[1]-2*cos(gamma0(t))*x0(t)*sin(alpha0(t))*sin(beta0(t))*zb[1]+2*cos(gamma0(t))*xp[1](t)*sin(alpha0(t))*sin(beta0(t))*zb[1]-2*sin(gamma0(t))*z0(t)*cos(beta0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]-2*sin(gamma0(t))*z0(t)*cos(beta0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]+2*sin(gamma0(t))*zp[1](t)*cos(beta0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]+2*sin(gamma0(t))*zp[1](t)*cos(beta0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]+2*sin(gamma0(t))*y0(t)*sin(alpha0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]+2*sin(gamma0(t))*y0(t)*cos(alpha0(t))*sin(beta0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]+2*sin(gamma0(t))*y0(t)*cos(alpha0(t))*sin(beta0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]-2*sin(gamma0(t))*yp[1](t)*cos(alpha0(t))*sin(beta0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]-2*sin(gamma0(t))*yp[1](t)*cos(alpha0(t))*sin(beta0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]-2*sin(gamma0(t))*x0(t)*sin(alpha0(t))*sin(beta0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]-2*sin(gamma0(t))*x0(t)*sin(alpha0(t))*sin(beta0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]+2*sin(gamma0(t))*xp[1](t)*sin(alpha0(t))*sin(beta0(t))*sin(psi[1](t))*cos(theta[1](t))*l3[1]+2*sin(gamma0(t))*xp[1](t)*sin(alpha0(t))*sin(beta0(t))*cos(psi[1](t))*sin(theta[1](t))*l3[1]+2*cos(gamma0(t))*y0(t)*cos(alpha0(t))*sin(beta0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]-2*cos(gamma0(t))*y0(t)*cos(alpha0(t))*sin(beta0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]-2*cos(gamma0(t))*yp[1](t)*cos(alpha0(t))*sin(beta0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]+2*cos(gamma0(t))*yp[1](t)*cos(alpha0(t))*sin(beta0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]-2*cos(gamma0(t))*x0(t)*sin(alpha0(t))*sin(beta0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]+2*cos(gamma0(t))*x0(t)*sin(alpha0(t))*sin(beta0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]+2*cos(gamma0(t))*xp[1](t)*sin(alpha0(t))*sin(beta0(t))*sin(psi[1](t))*sin(theta[1](t))*l3[1]-2*cos(gamma0(t))*xp[1](t)*sin(alpha0(t))*sin(beta0(t))*cos(theta[1](t))*cos(psi[1](t))*l3[1]

Do you have some ideas so as to simplify this equation ?

N.B : Former posts on the topic of trigonometric simplification

http://www.mapleprimes.com/questions/209884-Simplification-Of-Trigonometric-Expression-II

http://www.mapleprimes.com/questions/209721-Simplification-Of-Trigonometric-Expressions

I put a worksheet attached in order to facilitate the troubleshooting.

Thanks a lot for your help

trigonometric_simplification.mw

 

Hi. I'm hacing trouble writing a maple procedure for the question below, can anyone help?

 

Write a maple procedure which takes as its input the vectoeat u1 and u2 and the eigenvectors lambda1 and lambda2 where u1,u2 are element of R^2 and the lambdas are real numbers.

If u1,U2 is linearly independent then the output is the matrix A an element of R^2x2 with the property that Au1= lambda1u1 and AU2=lambda2u2;

if u1,u2 is linearly dependent then the output is the statement "not an eigenbasis".

 

I I then have two inputs which I have to do but I'm not sure on how to write the procedure. Any help will be much appreciated.  

 

Thanks :)

 

 

Dear all,

I developed a program to solve f(x, y) = 0 and g(x, y) = 0, I obtained as results (x=2.726, y=2.126) . running the same program another time it gives (x=2.762, y=1.992). how to explain this?

> fsolve({f(x, y) = 0, g(x, y) = 0}, {x = 0 .. infinity, y= 0 .. infinity});

Thanks in advance.

after solved, 

diff(a(t), t) = diff(a(t), t)

diff(b(t), t) = 0

diff(c(t), t) = -b(t)/c(t)

 

there is a diff(a(t), t) term 

how to plot this kind of system?

can diff(a(t), t) be ignore so that only consider two equations, diff(b(t),t) and diff(c(t),t) ?

if so, i use below to plot, it can not show the arrow clearing , i can only see arrow near origin, but not far point

with(plots):
fieldplot([0, y/x], x = -2 .. 2, y = -2 .. 2);
fieldplot([0, y/x], x = -2 .. 2, y = -2 .. 2, arrows = SLIM,grid = [1, 1]);
fieldplot([0, y/x], x = -10 .. 10, y = -10 .. 10);

 about how to calculate vector field of system of 3 differential equations which in terms of a(t), b(t), c(t) , diff(a(t),t), diff(b(t),t), diff(c(t),t)?

is the only method is the express diff(a(t),t), diff(b(t),t), diff(c(t),t) in terms of a(t), b(t), c(t) ?

for example 

<diff(a(t),t), diff(b(t),t), diff(c(t),t)>

if result is

diff(a(t),t) = a(t)*b(t)

diff(b(t),t) =b(t)*c(t)

diff(c(t),t) =c(t)*a(t)

<a(t)*b(t), b(t)*c(t), c(t)*a(t)>

then

is it the vector field <a*b, b*c, c*a> ?

 

When I put maximize(cos(t)), everything is fine.

When I put maximize(cos(Pi)), everything is fine.

When I put maximize(cos(t*Pi)), it says invalid limiting point??? What went wrong?

 

Hello,

I want to solve a optimization problem with maple/maplesim.

A car has to move a defined distance on a plane, straight road in a defined time. Given is the mass of the car, the maximum force to accelerate the car, the distance and the time. The rolling resistance and the drag force should be considered. At start-point speed v = 0m/s and also at the end-point speed should be v= 0m/s.

So there are the following model parameters:

mass                            m = 2000kg
distance                        d  = 1000m
time                              t_max = 120s
                                    v_0 = 0m/s
                                    v_d = 0m/s
accelerating force           -1m/s2 <= F_acc/m <= 1m/s2
resistance to rolling        F_rol = C + A*v2                      C and A are later defined
resulting force at mass   F_res = F_acc - F_rol

The energy consumption  integral F_acc(s) ds (from 0 to d) should be minimized and I want to print the graph of F_acc(s) 

How can or can Maple help me solving this optimization problem?

 

 

I'm looking for the 3-D integral formulae for Convolution, and Cross Correlation, between pairs of functions, which are each in spherical polar coordinates, for implementation in a MAPLE worksheet. Each function is normalized and symmetric around the origin.

Thank you for your consideration.

sys := {diff(b(t),t) = 0,diff(c(t),t) = -b(t)/a(t)};
DEplot(sys, [b(t),c(t)], t=0..5, x=-5..5, y=-5..5);
Error, (in DEtools/DEplot) Option keyword (x) was not in the allowed set of options, consisting of: iterations, arrows, dirgrid, obsrange, scene, colour, linecolour, stepsize, a dependent variable range, a list of initial conditions or one of the allowed plot options: {animate, axes, color, colour, coords, font, scaling, style, symbol, title, view, animatecurves, animatefield, axesfont, dirfield, labelfont, linestyle, numframes, resolution, thickness, tickmarks, titlefont, xtickmarks, ytickmarks}, or one of the allowed dsolve/numeric options: {abserr, control, ctrl, initial, itask, maxder, maxfun, maxkop, maxord, maxpts, maxstep, method, mi..

First 169 170 171 172 173 174 175 Last Page 171 of 334