MaplePrimes Questions

How I can, with the help of maple, perform the following demonstration using rsolve?

From Equation : Y(t)=1 +A t + B t2 + D t3

recursively determine t, by equation:

How can I plot this piecewise function:

 

for j from n-1 by -1 to 0 do

... does some processing that's not really relevant to the question:

s[j] := evalf(a[j]+b[j]*(t-x[j])+c[j]*(t-x[j])^2+d[j]*(t-x[j])^3)

end do;

 

S := t-> piecewise(

x[0] <= t and t <= x[1], s[0],

x[1] <= t and t <= x[2], s[1],

x[2] <= t and t <= x[3], s[2]);

 

My friends all...

Hi I would like to know how to traverse all terms in a polynomial. I've constructed formal polynomials out of abstract objects. They are all linear, without any cross terms. So I could have something like this:

f = 2a + 3b - c +8z

 

Ultimately I want to construct a table with the frequency of each element showing up in a random set of polynomials.

 

Thanks!

I Have a proc that creates some very long lists.
I would like to be able to store each of these lists with the same name in different indexed files.

What I would like to do looks something like...

fd:=["file1.m", "file2.m", ..., "filen.m"]

for i from 1 to n
do
proc(user defined variables)
save variable1,vaiable2, ...,variablem, fd[i]
end do:

This however doesn't work.

I would then like to be able then to run proceedures on these variables from each file.

hi everybody!

I have a question. Why my first loop works but the second one doesn't work?

first:

for m from 1 by 1 to 4 do

alpha := m+n:

od;

second:

for m from 1 by 1 to 4 do

for n from 1 by 1 to 4 do

alpha := m+n

od;

od;

what is my mistake?

Hello!

I'm writting a simple program to obtain chi-squared for my model. I've written it for a costant value of "n" and it correctly works and results chi-squared, but when I want to write a loop for "n" then the program doesn't work at all.

I don't recieve any error message. can you help me?

 

 

I am trying to solve the the differential equation. for this I have written the following program. But it is showing the error.

restart

with(plots)

eq := diff(x(t), `$`(t, 2))+326.1*(diff(x(t), `$`(t, 1)))+3190*(diff(x(t), `$`(t, 1)))^2-37500*sqrt(x(t)*(0.165e-2-x(t)))+2.825

BCs := [x(0), x(0.2e-1)-0.15e-2]

sol := dsolve({BCs, eq}, {x(t)}, type = numeric)

Maple is saying:

Error, (in dsolve/numeric/process_input) system...

Hi!

I'm sure there is a simple solution to my problem, but because I'm fairly new to using Maple, I can't figure out why my graph won't work. All I'm trying to do is graph a function along with its first and second derivatives within the same graph. The original function is f(x)= (2+sinx)^x2/(x2+1).

I defined the function as f and then found the first derivative by using df:=D(f...

EulerSystem:=proc(f,g,n,h,tinit,xinit,yinit,t,s,y);
local i;
t[0]:=tinit;x[0]:=xinit; y[0]:=yinit; 
for i from 1 to n do 
t[i]:= evalf(tinit+h);
x[i]:= evalf(xinit+h*f(tinit,xinit,yinit));
y[i]:=evalf(yinit+h*g(tinit,xinit,yinit));  od;  end;

 

When i tried to execute maple dispayed "unable to parse" but i can't find out where the syntax error is.  "local" was the word with the red dotted line box around...

I am attempting to define the rotation angle of an ellipse about the cartesian coord frame @ (0,0).  I am pretty sure the slope of the tangency vector @ both the major & semi-major axis is orthogonal to the vector originating from the origin from (0,0) with a length of a or b depending on which axis I am using.

My thought was in the case of the major axis that x = a*cos(theta) & the slope of the vector emanating from the origin is tan(theta).  So if I set dy/dx = -1/tan...

Hi, I am a student (with some programming background) in desperate need of help.

How can I create a zero based array in Maple and display it?

I am having all kinds of trouble creating vectors and arrays in Maple (the help is cryptic). This is the closest I got:

>F := Array(0 .. 4, 0 .. 4, [0])

 

That creates a 5x5 array of zeros, with the upper left element indexed by (0,0) (right?).

How do I display the array?

 Hi hi,

 

I've been sourcing various codes to help with plotting gaussian primes. I've managed a plot of gaussian primes within a given range with no problem at all. However, I'm looking now to make a plot of all gaussian primes connected by a step k or less to help communicate the Gaussian moat problem.  ( similar to figure 2 in http://mathdl.maa...

after do some correction still have error some later part....please give the commmen...

 

> restart;

> X:=<1,2,3,4,5,6,7,8,9,10>:

> Y:=<3.7,9.39,23.09,58.60,153.41,309.43,1103.63,2988.98,1112.08,22036.47>:

> eqn:=a*x+exp(b*x):

> solution:=Statistics:-Fit(eqn,X,Y,x,output=parametervalues);

 the problem is from maple.
It has to do with markowitz portfolio theory.
Ok Initially I have the risk and return from a given portfolio of 28 stocks.
I have defined both the return and the risk. Next I defined the covariance of the stocks also.
Next I defined some Lagrange multiplier where a and b are lambda1 and 2.
u:= j -> sum (x(i) s(i) s(j) - a - b f(i))
I then defined the next two Lagrange equations as
V:= sum(x(1)-1 = 0, i = 1 .. 28);

My problem is to find the right equation to get the best plot to the data shown below, please commen on it

 

> restart;

> with(CurveFitting):with(plots);

Warning, the name changecoords has been redefined

Warning, the previous binding of the name Interactive has been removed and it now has an assigned value

 

>

> datax:=...

First 1938 1939 1940 1941 1942 1943 1944 Last Page 1940 of 2431