Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Hello all of you,

I'm new here and I have a problem.

For homework I have to write a Maple package for the usage of dual quaternions. This is not a problem.

For example two functions of the package:

MyQuaternions := module()

  export Pretty, Ugly:
  local l1:
  option package:
 
  protect('i,j,k,epsilon'):
 
Pretty := proc(q::Vector)
  description "":
  return LinearAlgebra[Transpose](q)[1..4].Vector([1,i,j,k])+epsilon*(LinearAlgebra[Transpose](q)[5..8].Vector([1,i,j,k])):
end proc:

Ugly := proc(q)
  description "":
  local a;
  a := Vector(8);
  a[1]:=remove(has,remove(has,q,epsilon),{i,j,k});
  a[2]:=coeff(remove(has,q,epsilon),i,1);
  a[3]:=coeff(remove(has,q,epsilon),j,1);
  a[4]:=coeff(remove(has,q,epsilon),k,1);
  a[5]:=remove(has,coeff(q,epsilon),{i,j,k});
  a[6]:=coeff(coeff(q,epsilon),i,1);
  a[7]:=coeff(coeff(q,epsilon),j,1);
  a[8]:=coeff(coeff(q,epsilon),k,1);
  return a:
end proc:

end module:

savelib('MyQuaternions'):

 

Now I can load the module in a differnet maple worksheet "main.mw" by typing "with(MyQuaternions):"

The crucial thing now is the following: i,j,k,epsilon should be protected in "main.mw". I can do this by typing "protect('i,j,k,epsilon'):" Is there a way to tell maple to protect these variables automatically when the module is loaded? Or do I always have to type in the protect command by hand?

Thank you,

Josef

Hello,

How can I pde with maple?please explain completely,and other question :How can I solve pde with plot in maple because some questions dont have exact answer?

Good afternoon.

 

I request your kind suggestion to my above cited query.

 

 

With thanks & Regards

 

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

Hyderabad, Andhra Pradesh, INDIA.

I'm working on a complex problem in Composite Materials. I've gotten to a near-result 6x6 matrix, with several cells containing polynomial denominators. I have an equation for simplifying these, which boils the polynomials down to a single variable, but I can't seem to get it to substitute in. Can anyone help me solve this? The problem is also time-sensitive.

 

Hi Maple friends.

If Maple solves an equation and spits out an answer like this,

{x = 4/3+(1/3)*sqrt(7)}, {x = 4/3-(1/3)*sqrt(7)}

how can I get a decimal answer, other than by using my calculator?

Thanks in advance.

Hi everyone

Right now I am working on a command that calculates the molar mass of molecules. Mostly it is working like a charm but in some cases the interpretation of the input goes wrong.
The command converts the input to a string, e.g.:

f:=convert(Ca3(PO4)2, string) = "Ca[3](PO[4])[2]"

f := StringTools:-Remove("[]_*^+-", f) = "Ca3(PO4)2"

 

However, sometimes information such as parentheses is lost (which is understandable considering the fact that maple does not know chemical syntax):

f := convert(NH[3][3]*PO[4], string) = "NH[3][3]*PO[4]"

f := StringTools:-Remove("[]_*^+-", f) = "NH33PO4"

 

In special cases it goes completely nuts (I am aware this is not a real molecule):

f := convert(Al(OH)2(NH3)2, string) = "Al(`#msub(mfenced(mi("OH")),mn("2"))`)(NH[3])[2]"

 

The problem could of course simply be solved by typing the input as a string with no subscripts but is looks much nicer with the correct chemical syntax as input.

Do any of you know a way to translate the input charactor by charactor into a (understandable) string?

 

Thanks in anvance,
Mads 

 



Hello,

Is it possible to install on the same machine both the version 32bits and 64bits ?

For example, for some software (like visio) it is possible to have several version of the softwares.

In fact, it can be useful for me because with 32 bits I can communicate with 32bits softwares and with 64bits I can do quicker some calculations.

Thank you for help.

 

I have an indexed equation that contains serval definite integrals in it. I want maple to evaluate the equation for different indices. But when I set the parameter "N=100" in the code, it takes maple lots of time for the evaluation. I am looking for some tricks to make the code numerically more efficient. I will be so thankful for any opinion and help.
you can find my code below. The code is so simple and just contains few lines. I will appreciate any help.

Numerical_Performance.mw

Thanks in advance.

For two angles a and b, and functions f and g, I have a system of two equations,

diff(a(t),t$2) = f(a(t), b(t), diff(a(t),t), diff(b(t),t)) and diff(b(t),t$2) = g(a(t), b(t), diff(a(t),t), diff(b(t),t)).

The actual equations (i.e. not in terms of f and g) are known but are ommitted because they are very long.

 

I need not the solutions but simply the time t at which a(t) = b(t). While I have inputted the full equations into Maple, I do not know how to ask it to find an expression for t in terms of the constants of the equation.

How would I ask Maple to find this time?

I am sure that with this vector file with embedded components will learn how it works the vector operations. The code is free and can be modified to be improved. Forward engineers.

 

Vectores_con_Components_Embedded.mw     (in spanish)      

 

Lenin Araujo Castillo

I'm used to Mathcad, and I am very new to Maple. Something I cannot figure out right now is how to define multiple elments of a matrix using a function.


Input Data

Define system dimensions as n:=2;

i:=1..n;

j:=1..n;

lambda:=Matrix(n);

Lambda:=Matrix(n);

upsilon:=vector(n); 

Minor side note: I originaly had upsilon defined using the syntax "Vector[row](ncomp)", but this was giving me an 'exponentiation' operation error, so I changed it to what it is now (basically a list/array, which I guess has different type definitions that no longer cause the error?).

lambda[1,2]:=471.0433;

lambda[2,1]:=883.7530;

upsilon[1]:=58.69;

upsilon[2]:=18.07;

The Problem I'm Having

Now I just want to define Lambda using a function to define all elements (like I would in Mathcad).

Lambda[i,j]:= (upsilon[j]/upsilon[i]) * exp (-lambda[i,j]/2853);

which gives me an extremely long error message:

Error, invalid input: exp expects its 1st argument, x, to be of type algebraic, but received Matrix(2, 2, {(1, 1) = -0.3504976272e-3, (1, 2) = -.16509955895845776, (2, 1) = -.30975332953088164, (2, 2) = -0.3504976272e-3}, datatype = float[8]

As far as I can tell (keep in mind that this is my very first Maple project) that it doesn't like lambda as a matrix? But shouldn't it just evaluate to the element? and why is (2,2) and (1,1) giving values, because it should intialize to zero, so exp(0) = 1 in these cases??

I tried to simplify further by just trying

Lambda[i,j]:=(upsilon[j]/upsilon[i]);

but then it just gives me 1, and when I look into Lambda all the elements are now 1 when only the diagnol elements should be 1 (the rest some fractional amount)??

I am at a complete loss. I thought about doing something like For i = 1 to n etc. but then it just looks like coding, which defeats the purpose of trying to make a calculation sheet documenting the procedure...

Any help and/or insights into what I am doing wrong here would be most welcomed :)

P.S. I've just noticed that there is an upload option :/ Wilson_Equation.mw.

 

I have been learning to use the Physics package in Maple 18.  I just updated to the latest version of the Physics package to see if it would fix the problem by my results are the same.

When I take a covariant derivative in spherical coordinates it does not appear to have a scale factor such as g_kk below.  

 A_(j;k)=1/(g_(kk))(partialA_j)/(partialx_k)-Gamma_(jk)^iA_i,

This definition of comes from the Mathworld web site.  I think they have a typo such that it should actually read h_k which is the scale factor instead of g_kk which is the metric.  They are related by h_k^2 = g_kk.

Why doesn't Maple's covariant derivative have the scale factor when I am differentiating in spherical coordinates?

Thanks!

One of my students just showed me the following strange behaviour with Maple 18 (17?) on her Mac computer:

After entering anything at all in math mode, the Enter key has no effect.

After an empty line in math mode the Enter key works fine, and also after anything (including nothing) in text mode.

She has uninstalled and reinstalled Maple several times.

I have absolutely no clue. Do you?

If nobody has a clue, I will be back with more detailed information.

Knud Fjeldsted
Denmark

Hi,

 

I am having trouble solving the PDE. Can anyone shine some light?


``

sys:=-(1/2)*(diff(f(phi, s[1], s[2], w[1]), s[1]))*(s[1]-s[2])*s[1]/(s[2]*w[1])+(1/2)*(diff(f(phi, s[1], s[2], w[1]), s[2]))*(s[1]-s[2])*s[2]/((-1+w[1])*s[1])+diff(f(phi, s[1], s[2], w[1]), w[1]) = 0;

-(1/2)*(diff(f(phi, s[1], s[2], w[1]), s[1]))*(s[1]-s[2])*s[1]/(s[2]*w[1])+(1/2)*(diff(f(phi, s[1], s[2], w[1]), s[2]))*(s[1]-s[2])*s[2]/((-1+w[1])*s[1])+diff(f(phi, s[1], s[2], w[1]), w[1]) = 0

(1)

pdsolve(sys);

 

``


Download 1234.mw

Say the values of i^2 are being calculated from within a procedure,

 

mytest:=proc(n)

local ans;

    ans:=0;

    for i from 1 to n do

   ans:=ans+i^2;

   end do;

   return ans;

end proc;

 

Could I have a (time series) plot of i^2, while the values are being calculated?

The above is a toy example. What I want to archieve is to track a particular intermidiate values while the procedure is running.

 

Thanks,

 

casper

First 76 77 78 79 80 81 82 Last Page 78 of 86