MaplePrimes Questions

Hello everyone,

I need to write a procedure which takes a function as an input, differentiate it wrt x, multiply the result with x/y, and then evaluate the resulting function of (x,y) in a loop at different (x,y) pairs and return the results. 

I have a problem at the very first step though:

Suppose my function is

y := x->-(x-6)-0.01*(x-6)^3;

hence the new function I want to use in my procedure is

g := (x,y) -> diff(y(x),x)*x/y;

HI all,

After long manipulations, I was able to write the first solution y1 in this form (following the method of Frobenius):

Q: Write a procedure OddEven that takes a list L of integers and returns a list of the odd-numbered entries followed by the even-numbered entries.  So, for example,
OddEven([1,3,5,7,9,11]);
should return [1,5,9,3,7,11].  (Note: unless you find a clever solution you will need a several-line procedure using proc..end proc.   You will perhaps need an if statement so that you can deal with the case where the list has an odd number of elements and where it has an even number of elements separately.)

 

 

My ideas...