MaplePrimes Questions

What is the easiest way to ask roots of a polynomial on a finite field. For example asking roots of x^2+xy+y on GF(8)? I was thinking to run a two for on members of GF(8) and ask to check it but I couldn't do it using Galois package or maybe I couldn't use that package. Thanks for any help.

I am wondering why Maple does this.

> f:=x^2
> f(3)
output: x(3)^2

I understand the difference between an expression and a function. If f is an expression, shouldn't it ouput  x^2(3). Why is the output x(3)^2?

When I enter f*3 or f*(3) then I get the correct expression.

Here is a screenshot. http://prntscr.com/a7u9hm

Here is image inserted with a slightly different function

 

Also while I am here, what exactly does g(x):= x^2 do? when i enter g(3) I get g(3) back.

g(x) is neither a function nor an expression.

screenshot http://prntscr.com/a7ua75



Dear All

I have third party Maple package saved along path E:/Maple work/General Maple Workout/TWS.mpl, but after using march command for other package, Maple is reporting error like "unable to read; E:/Maple work/General Maple Workout/TWS.mpl". What could be possible reason for this?

Moreover when I type "currentdir()" it shows me "C:\WINDOWS\system32" which is right path from where Maple is working

Regards

Hello,

I  put a caption under a plot and I want to use subscript. Since this is not the math mode, [] or __ does not work. Anyone knows, how to use subcript under the plot caption?

 

Thanks,

 

Hi all, 

 

I was wondering if it is possible to add a colour gradient to a point plot to represent another perameter in the data.

 

 

For example, each point corresponds to a value of 'f' ranging from 0.1 to 1, and I was wondering how to display this by means of a colour gradient.

 

 

Thanks,

 I am haunted by an equation which I could simplify it with hand and it equals to −i (complexe number). But, I don't know how to use maplesoft to simplify it. The equation takes the form of:

 

-Omega*a*sqrt(2)*sqrt(-Omega^2*a^2-2*k*m+sqrt(Omega^2*a^2*(Omega^2*a^2+4*k*m)))/(-Omega^2*a^2+sqrt(Omega^2*a^2*(Omega^2*a^2+4*k*m)))



I could simplify this equation with hand calculation and it equals to -i (the complexe number). I'am sorry for not clarifying that the a, k, Ω and m are positive variables.

Thank you in advance for taking a look.

This might be a mis-understanding on my part, so I figured I would ask a question first.  Narrowing down my code to something minimalistic, suppose I have 2 functions, each of which take a 'context' (abbreviated ctx) as a keyword parameter.  Now, suppose that the first one calls the second, like so:

foo := proc({ctx :: list := []}) bar(ctx = ctx) end proc:
bar := proc({ctx :: list := []}) nops(ctx) end proc:

and then a call "foo(ctx = [a,b,c])" returns the (completely unexpected) value 0.  See if you can puzzle out why.  If I change my code to use different names, like

foo1 := proc({ctx :: list := []}) bar1(_ctx = ctx) end proc:
bar1 := proc({_ctx :: list := []}) nops(_ctx) end proc:

Then the call "foo1(ctx = [a,b,c])" returns the expected 3.

I have tried a number of variants, like changing the call to bar('ctx' = ctx) in foo, but that does not work.  The completely un-intuitive :-ctx does work.

Is this documented anywhere?  Is this really the intended design?  Not being to re-use a name for a keyword parameter without going through some contortions seems, a little, shall I say, odd?

Just starting some work on numerical engineering solutions by going through a workbook, which includes a Maple Document on CD (with one index.mw and several .mws files).

As I don't have acces to a Maple system, I downloaded Maple Player. However - Maple Player will only accept .mw and .mwz files(at least that shows up on 'FILE>OPEN'); so trying to open an .mws file results in - NOTHING. In your forum I found some information that .mwz is a nonpublic Maple format !?...... Now I don't see a way to work with PLAYER. Isn't PLAYER meant for exactly that scenario - sharing MAPLE worksheets ?

So - what to do ?

Thanks for some hint,

GW.G

 

 

 

 

How do I write a procedure to find a root of f(x)=0 in the vicinity of a given value x0. The procedure should initially use the rearrangement method to produce a linearly convergent sequence of values, and should, when appropriate, switch to Aitkin's Method. The input for the procedure should be the re-arranged function and the velue for x0. The output should be the root and the number of iteration taken. The procedure should check that re-arrangement will converge. This program should do in Maple V Release5.

Thank you for your help.

 

Hey,

I wonder if there is an operator to skip inputs and outputs of functions. Consider this example:

The output would be:

However my system is much bigger and I only need the second output of the command and I dont want to waste memory on the first.

In Matlab I would write

~,ans := GenerateMatrix(...)Is there a similar shortcut availible in Maple?

 

Thanks in advance!

 

Hello,

I would like to simplify this following trigonometric expression :

Code:
eq_liaison:= x0(t)-sin(alpha0(t))*sin(gamma0(t))*sin(beta0(t))*xb[1]+sin(alpha0(t))*sin(beta0(t))*cos(gamma0(t))*zb[1]+sin(alpha0(t))*cos(beta0(t))*yb[1]+cos(alpha0(t))*sin(gamma0(t))*zb[1]+cos(alpha0(t))*cos(gamma0(t))*xb[1]+l2[1]*(sin(psi[1](t))*sin(alpha0(t))*sin(gamma0(t))*sin(beta0(t))-cos(psi[1](t))*sin(alpha0(t))*sin(beta0(t))*cos(gamma0(t))-sin(psi[1](t))*cos(alpha0(t))*cos(gamma0(t))-cos(psi[1](t))*cos(alpha0(t))*sin(gamma0(t)))+l3[1]*(sin(theta[1](t))*sin(psi[1](t))*sin(alpha0(t))*sin(beta0(t))*cos(gamma0(t))+sin(theta[1](t))*cos(psi[1](t))*sin(alpha0(t))*sin(gamma0(t))*sin(beta0(t))+cos(theta[1](t))*sin(psi[1](t))*sin(alpha0(t))*sin(gamma0(t))*sin(beta0(t))-cos(theta[1](t))*cos(psi[1](t))*sin(alpha0(t))*sin(beta0(t))*cos(gamma0(t))+sin(theta[1](t))*sin(psi[1](t))*cos(alpha0(t))*sin(gamma0(t))-sin(theta[1](t))*cos(psi[1](t))*cos(alpha0(t))*cos(gamma0(t))-cos(theta[1](t))*sin(psi[1](t))*cos(alpha0(t))*cos(gamma0(t))-cos(theta[1](t))*cos(psi[1](t))*cos(alpha0(t))*sin(gamma0(t)))-xp[1](t) = 0

I would like to make groups like : cos(a)cos(b) - sin(a)sin(b)=cos(a+b)  but keepind the maximum of expression products

On the following example (2 equations below), the function combine(expr,trig) works well 

Code:
eq_liaison[1] := cos(gamma(t))*r+(cos(gamma(t))*cos(psi(t))-sin(gamma(t))*sin(psi(t)))*l-x(t) = 0 
eq_liaison[2] := sin(gamma(t))*r+(sin(gamma(t))*cos(psi(t))+cos(gamma(t))*sin(psi(t)))*l = 0



But, I would like maple do only the first simplifications in order to the maximum of expression products. The function combine(expr,trig) goes too far in the first equation and I obtain only expression sums. 

Do you have ideas to simplify the first trigonometric equations
- with groups like : cos(a)cos(b) - sin(a)sin(b)=cos(a+b)
- and keeping products of expressions ?

Thank you for your help

f=x^2.  It's easy to compute the fouier transform. F(y)=fourier(f,x,y).

However, I want to do more. replace the variable y with a new formula g(z)=z^2.

I tried  "subs(y=g,F)". But failed. Need your help.

with(MTM):

f := x^2

x^2

(1)

F := fourier(f, x, y)

-2*Pi*Dirac(2, y)

(2)

g := z^2

z^2

(3)

subs(y = g, F)

-2*Pi*Dirac(2, y) = z^2

(4)

NULL

``

 

Download code.mw

I have:

r:=t-><4cos2t+4sint,5cos3t+4cost,(sin3t+2sint)^2>

with(plots):

 

then I tried:

spacecurve(r(t), t = 0 .. 2*Pi, thickness = 2, color = black, axes = normal, labels = [x, y, z], numpoints = 150)

But I keep getting the error: Warning, unable to evalute the function to numeric values in the region. 

But I thought <4cos2t+4sint, 5cos3t+4cost, (sin3t+2sint)^2> was defined on the region t=0 to 2Pi??? 

I'm using Maple 2015 if that helps. 

Dear all;

I open this good discussion, and hope can get a nice and strong idea in this domain of approximation of Hankel funciton and order truncation of infinite series. Thanks for all idea, can improve the discussion. 

Using the asymptotics of Hankel function for large argument and large orders ( both together) and
find   an order of truncation N of the obove series so that we can ensure an error bound  of epsilon( epsilon very small given).  abs(sum ( c[m]*HankelH1(m,x)*exp(I*m*theta), m=-infinity..infinity)-sum ( c[m]*HankelH1(m,x)*exp(I*m*theta), m=-N..N))<epsilon.

A first idea come in mind: the series converge, so that the general terms of this series converge to zero, and in particularity,  abs(c[m]* HankelH1(m,x))<1:
then abs(c[m])<1/ abs(HankelH1(m,x)).
So we can ensure an error bound of epsilon on the coefficient c[m] by imposing  (HankelH1(m,x))<epsilon  this lead to abs(c[m])<epsilon.
I consider the case where m and x are very large, I can suppose for example m=x*(1+zeta), with 0<zeta<1. zeta parameter. So that our truncation N depend on zeta.
And then how can I find and approximation of the inverse of Hankel function for large argument and large order. using m=x*(1+zeta). I think this give us N the truncation order.
I hope get a good discussion in this subjet.
Of course maybe there are other strong idea to compute the truncation series.
I get the following error in the code:

Error, (in MultiSeries:-multiseries) unable to expand with respect to parameter

 

 

 

###### Code### and error
restart:

with(MultiSeries):
assume(0 <= x);

assume(0 <= zeta<1);

HankelH1(v,x):

sum(c[m]*HankelH1(m, x)*exp(I*m*theta),m=-infinity..infinity);

1/HankelH1(x*(1+zeta),x);

MultiSeries:-asympt(%,x, 4);

eval(%, O=0);

convert(%,exp);

simplify(%);

truncated_series.mw

I got a set of ecuations to solve, like this one:

eq[1]:=W[1,0]*(a*HRa[1,0]+b*ga[1,0]+c)=d*SR[1,1]

a,b,c,d are numbers, like 2.0458 and so on.

 

When I want to solve the set, I need to tell Maple the command solve:

solve( {seq(eq[i],i=1..N)},{variables});  (N is an integer of course)

 

To set the variables, one must check each equation to write: {W[1,0],HRa[1,0],ga[1,0]...} and so on.

I know that I can use the command is(variable,assignable) to check if a variable has not a value assigned already and, according to true/false I can construct the set {variables} and solve the set of equations.

That´s an easy solution if I need to check variables under a certain pattern, like: X[1].X[2],X[3] since I can create a loop and check them one after the other. But my problem is that I have different names for variables or that variables change to assignable from assigned according to other conditions, so I can never be sure if W[1,0] is going to be a variable to compute in all steps instead of SR[1,1].

for example:

if a>3 then
SR[1,1]:=1/2;
else
W[1,0]:=300:
end if;

So, when I need to type solve, the {variables} part is different according to each case. Is there any command that allow me to insert an expression and Maple can return me the variables or parameters in the expression that are not numeric already?


Thanks in advance.

First 1158 1159 1160 1161 1162 1163 1164 Last Page 1160 of 2428