longrob

Mr. Robert Long
2 years, 238 days


These are questions asked by longrob

Hi all

Can anyone suggest ways of speeding up this code ?

div_vec := proc(a::Vector,b::Vector)
# procedure returns the element-byelement
# division of vector a by vector b
local i,c:
c:=Vector(Dimension(a)):
for i from 1 to Dimension(a) do
c[i]:= a[i]/b[i]:
end do:
return c:
end proc:
Thanks
LR

Root Finding again

July 25 2011 by longrob 1249 Maple
I came across this problem while helping another user find the maxima of an expression for 
various values of a parameter here:
http://www.mapleprimes.com/questions/124104-Maximum-Points--Of-Function-With-More

For various values of ga, it was required to find the maxima in a range of 0<delta<2.
Plots of the expression indicate that one such maxima exists for each value of the parameter.

My approach was to find the zeros of the first...

A recent question prompted me to wonder whether other Maple users are using the latex output from Maple in their formal written work ? Personally I've found the Maple latex output to be lacking in a number of ways, one of which the writer of this question has found

http://www.mapleprimes.com/posts/96808-How-Do-I-Convert-An-Expression-Like

I myself gave up using latex output...

I'm taking a calculus of variations class and checking some answers with Maples VariationalCalculus package and the EulerLagrange command in particular.


I've done an exercise by hand for which I don't get the same results from Maple and I'm trying to see why.


Can anyone help me construct the EL equation "manually", in partcular how do I get the partial derivartive of an expression containing x, y(x) and diff(y(x),x) with respect to diff(y(x),x) ? That...

Hi, can anyone point out what I've done wrong in setting up this PDE solution: PDE:=diff(u(x,t),t$2)+diff(u(x,t),t)-diff(u(x,t),x$2)=sin(Pi*x/l); BCs:=u(0,t)=0,u(l,t)=0; ICs:=u(x,0)=0,D[2](u)(x,0)=0; ans := pdsolve([PDE,BCs,ICs],u(x,t)) assuming l

phase portrait

February 10 2010 by longrob 1249 Maple
Hi all I'd like to construct a phase portrait of a DE system with several different solutions on one plot. To do this I've been using odeplot for each solution and then displaying each plot with display(). Now I'd like for there to be arrows on each solutions, resulting in a phase portrait which will show the direction of phase flow for each orbit, but I couldn't find a way to add arrows to each individual plot. Is there a way to do that ? If not, is there a different approach to achieve this kind of phase portrait ? Thanks LR
Greetings all restart; f := x->x^4: assume(n::integer): an := 1/Pi*int(f(x)*cos(n*x),x=-Pi..Pi): FaN1 := sum(an*cos(n*x),n=1..N); FaN2 := Sum(an*cos(n*x),n=1..N); On Maple 13, FaN1 and FaN2 are very different representations of this series. However, on Maple 11 they are the same (same as FN2 on Maple 13). How can I persuade Maple 13 to convert FaN2 to FaN1 ? Also, how can I persuade Maple 11 to convert aFN1 to FaN2 ?
Hi all I'm trying to obtain an expression for oscillatory motion in terms of the long-run amplitude, phase angle and frequency of a driven oscillatory system: deq:=diff(x(t),t$2)+lambda*diff(x(t),t)+omega[0]^2*x(t)=F[0]*sin(omega*t); The steady state solution I get from Maple is in this form ss:=((-omega[0]^2+omega^2)*sin(omega*t)+cos(omega*t)*omega*lambda)*F[0]/(omega^4+(lambda^2-2*omega[0]^2)*omega^2+omega[0]^4);
Hi all I'm using a set of parameters, such as {a=1.b=2,c=3} to do various manipulations of an ODE system. Then later I want those parameters to be assigned their respective values, but I'd rather not have to do a:=1;b:=2;c:=3 Is there a way to do that ? Thanks LR
This problem has ocurred a few times and is quite troublesome.
Greetings Is there a nice way to obtain the jacobian of a system of ODEs ? For example with restart: ross_x:=diff(x(t),t)=-y(t)-z(t): ross_y:=diff(y(t),t)=x(t)+a*y(t): ross_z:=diff(z(t),t)=b+x(t)*z(t)-c*z(t): rossler_sys:=ross_x,ross_y,ross_z; I can't seem to find an easy way to do it, other than re-write the system altogether s_x:=-y-z: s_y:=x + a*y: s_z:=b+z*(x-c): J:=Matrix([[diff(s_x,x),diff(s_x,y),diff(s_x,z)],[diff(s_y,x),diff(s_y,y),diff(s_y,z)],[diff(s_z,x),diff(s_z,y),diff(s_z,z)]]); .....which seems horrible. Thanks LR

Can't interupt evaluation

January 21 2010 by longrob 1249 Maple
Greetings
Hi all I see it is very easy to define a simple function in Maple using -> But what if more than a single expression is needed and if local variables are needed ? Is there a way to put several statements and use local variables in a function definition ? For example to define a function that takes a list as it's argument and returns the arithmetic mean or the simple sum. Must such things be done with a procedure ? Thanks !
Hi all I have > tst:=-(1-cos(p))/p^2+1/2*cos(1/4*p)^2*cos(1/8*p)^2*cos(1/16*p)^2: >plot(tst); which seems to work OK. However, this generates an error plot(tst,Pi..2*Pi); Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct Plotting error, empty plot ...as does any other range I have tried. I guess it's something very simple, but if someone can point me in the right direction I would appreciate it !
I'm very new to maple and I've been experiencing a few difficulties. One in particular is quite frustrating: when opening a worksheet in classic worksheet mode I get a message that it was created in an earlier version, and after clicking OK maple crashes. For example, with the document here: http://www.maplesoft.com/applications/view.aspx?SID=1404 I am using Maple 12. This problem does not occur in standard gui mode, only classic worksheet mode but for a variety of reasons I wish to use classic as much as possible. Thanks
1 2 Page 1 of 2