MaplePrimes Questions

If I were to evaluate a single numerical integral, I can use evalf( Int(,method = _d01amc)).

But when the expression say is created by a built in function, Student[VectorCalculus][Hessian], from a complicated expression involve integrals. The resulting expression does not have the option "method = _d01amc". It then takes a long time to evaluate.

See this "HE" variable for example. HE.txt

value(HE); # takes a long time

evalf(HE); # takes a long time

 

Is there a way to evaluate "HE", using ",method = _d01amc" wherever necessary?

 

Thanks!

I'm doing some stuff with Taylor Polynomials on Maple. In particular, I'm trying to find the second order Taylor Polynomial of e^x cos x. I'm using the "taylor" command.

 

This is what I have so far:

 

> f := proc (x) options operator, arrow; exp(x)*cos*x end proc;
x -> exp(x) cos x
> s2 := taylor(f(x), x = (1/3)*Pi, 2);
> p2 := convert(s2, polynom);
1 /1 \
- exp|- Pi| cos Pi
3 \3 /

/ /1 \ 1 /1 \ \ / 1 \
+ |exp|- Pi| cos + - exp|- Pi| cos Pi| |x - - Pi|
\ \3 / 3 \3 / / \ 3 /
> y1 := evalf(subs(x = .5, f(x)));
0.8243606355 cos
> y2 := evalf(subs(x = .5, p2));
-0.208092943 cos

 

Everything looks fine until the last two lines.

 

How do I interpret ".8243606355*cos" ? Cosine should have an argument. Am I messing up something with my code, or is this standard in Maple language?

Hi all,

Assume that we have a vector, namely v:=[1,-2,3,-4] and we want to construct special matrix namely Z, from Vector v as follow:

first row is 1, secnond row is -2,..., the end row is -4 namely
Matrix([[1,1,1,1],[-2,-2,-2,-2],[3,3,3,3],[-4,-4,-4,-4]]);

in the other word every row of matrix is 4 times corresponding componet in vector.(for example v is (1*4))

how can we do this?

best wishes

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

n=512, what is number = nops(T) without actual running code?

 

n := 512;
T := [];
for i from 1 to n do
for j from 1 to n do
if i < j then
for k from 1 to n do
if j < k then
T := [op(T), [i,j,k]];
end:
od:
end if:
od:
od:
nops(T);
T;

how to access the variable which is currently running in another worksheet

to use for loop to read the Table

when worksheet is evaluating for a very long time, 

expect to read the value Table T in anther worksheet

 

worksheet1

for i from 1 to nops(polylistresult) do

if i < j then
for j from 1 to nops(polylistresult) do
for k from 1 to nops(polylistresult) do

if j < k then

with(Groebner):
F := [polylistresult[i], polylistresult[j], polylistresult[k]];
h := function1(F, {x, y, z}, s);
T[h] := [op(T[h]), F];

end if:
od:

end if:
od:
od:

worksheet2 :

for i in indices(T) do
oo:=i[1];
od:

it is not a maple question, but i need it before running in maple

could you give a help?

how to get a list of terms of expression such as x+z^2 in gap system?

how to convert to a list [x, z^2] for for loop to get each terms?

x+2*y+z^2

expected output for for loop

for i in List(x+2*y+z^2) do
    print(i)

x
2*y
z^2

Good day everyone, please help in writing finite difference algorithm for these coupled nonlinear ODE. See it here Algorithm.mw 

As title.

 

While  I can  decide velocity,charge and Distance.

 

 

 

Hi

I have three system of ODE and i would like to solve it using Homotopy perturbation method. Could you please provide to me the code in Maple or the Maple pachage that used to solve it by Homotopy perturbation method ?

I hope to hear you soon

Sara

 

Hi there. 

I'm kind of new to Maple and i'm trying to solve a Linear Algebra problem for my class of Linear Algebra of the course of Physics. Also, my first language is portuguese so forgive for my not-so-perfect english.

I have a (solved) linear system of 7 equations and 12 variables (A, B, C, D, E, F, G, H, I, J, K, L) that is the following:

  • A = 33 - K - L
  • B = 1 + F - J
  • C = -15 - F + J + K + L
  • D = 15 + H - K
  • E = 16 - F - H + J + K
  • G = 34 - H - J - L
  • I = 18 - J - K

Note: I'm using letters (A, B, ..., L) instead of X1X2, ..., X12 because it's easier to write it like this here and because I don't know if the Xn notation is allowed on Maple (i don't think so).

So, the system is possible but undetermined (with 5 degrees of freedom), being F, H, J, K and L the free variables.

Until here, everything's fine. The problem arises when the professor asks us for every solution of the system that satisfies the condition that all the variables (form A to L) are positive integers (A, B, C, D, E, F, G, H, I, J, K, L ϵ IN → natural numbers).

From my understanding, that gives rise to a system of linear inequalities with 12 variables and the following inequalities:

  • A = 33 - K - L > 0
  • B = 1 + F - J > 0
  • C = -15 - F + J + K + L > 0
  • D = 15 + H - K > 0
  • E = 16 - F - H + J + K > 0
  • G = 34 - H - J - L > 0
  • I = 18 - J - K > 0
  • > 0
  • > 0
  • > 0
  • > 0
  • > 0                            (and A,B,C,D,E,F,G,H,I,J,K,L ϵ IN)



After some research, i found that a possible way to solve this type of system of linear inequalities is trough a method of elimination (analog to Gauss-Jordan's elimination method for systems of linear equations) named Fourier-Motzkin. But it's hardwork and i wanted to do it on the computer. After some research, i came across with the following Maple command:

SolveTools[Inequality][LinearMultivariateSystem]

http://www.maplesoft.com/support/help/Maple/view.aspx?path=SolveTools%2fInequality%2fLinearMultivariateSystem

So, I tried to use that command to solve my system, with the following result (or non-result):

with(SolveTools[Inequality]);
LinearMultivariateSystem({F > 0, H > 0, J > 0, K > 0, L > 0, 1+F-J > 0, 15+H-K > 0, 18-J-K > 0, 33-K-L > 0, 34-H-J-L > 0, -15-F+J+K+L > 0, 16-F-H+J+K > 0}, [F, H, J, K, L]);

Error, (in SolveTools:-Inequality:-Piecewise) piecewise takes at least 2 parameters


So, i really need help solving this as the professor told us that the first one to solve would win a book, eheh. I don't know what I'm doing wrong. Maybe this Maple command is not made for 12 variables? Or maybe i'm just writing something on a wrong form. I've never used Maple before so i can be doing something really stupid without knowing it.

I would really apreciate an answer, as my only goal as a future physicist is to unveil the secrets of the Cosmos to us all.

Thank you again.

Miguel Jesus





teliko.mwMapl_doc.docxHello,

After I have substitute all the variables by hand ,maple still continious  processing(27 hours and still evaluating)for a simple

summarisation by the time that live math2 needed only 2 mins.Have i done something wrong?I want to solve the following equation which is shown in the attached file with the experimental data

OK. Perfect. It runs.

Now, I would like to remove all the set of solutions where for two variables (for example a and b) are negative.

For example, if I have this :

{a=1,b=-1,c=1}, {a=1,b=1,c=1}, {a=-2,b=-1,c=1}

After filtering, I would like to have only :

{a=1,b=1,c=1}

Thanks a lot for your help.

 

Hello,

After a solve on a system composed with trigonometric functions, i obtain several group of solutions.

Here a picture of my solutions :



How can I do to extract from thses solutions only the group composed with real components.

Thanks a lot for your help

I read this, but there was nothing on how to write a help associated with it.

Does anyone know where I can find it?

 

Many thanks,

 

casperyc

I want to draw a contour plot like the pic below which the relating value of each curve is specified on several parts of the curve. Can anyone suggest a way? :)

As an example do it with the following function:

f(x,y)=x^2+y^2-5

First 1372 1373 1374 1375 1376 1377 1378 Last Page 1374 of 2428