h:=0.1:
n:=ceil(5.0/h):
t:=0.0:
y:=2.9:
data[0]:=[t,y]:
for i from 1 to n do
mk := y^2-4y+3:
y := y + h*mk:
t := t + h:
data[i] := [t,y]:
od:
t:='t': y:='y': h:='h':
datalist1 := [ seq( data[i], i=0..n ) ];
plot1:=plot( datalist1, 0..5, 0..4, color=red);
display([plot1,plot2]);
ok this is what i have typed in...the equation is dy/dt = y^2-4y+3
i am able to plot the direction field
but now when i use Euler's method to find a solution with y(0)=2.9 for 0<>

h:=0.1:
n:=ceil(5.0/h):
t:=0.0:
y:=2.9:
data[0]:=[t,y]:
for i from 1 to n do
mk := y^2-4y+3:
y := y + h*mk:
t := t + h:
data[i] := [t,y]:
od:
t:='t': y:='y': h:='h':
datalist1 := [ seq( data[i], i=0..n ) ];
plot1:=plot( datalist1, 0..5, 0..4, color=red);
display([plot1,plot2]);
ok this is what i have typed in...the equation is dy/dt = y^2-4y+3
i am able to plot the direction field
but now when i use Euler's method to find a solution with y(0)=2.9 for 0<>

I have an array I have defined within Maple - how does one plot the array? I have tried defining a function mapping the index to the element of the array, but it's not clear how to restrict that to integers ...
-Monty

I am trying to create an array for testing the FFT errors within maple. Every time I try to assign values to the 1024-element array, the program prints them all out. Is there any way to turn this off?

How do I multiply(expand) a Polynomial and get it's shortened form?
I have a polynomial X^2+a*X+b
and I rise it to the power of 2 and multiply by X
eg X*(X^2+a*X+b)^2
and I wish to get the answer for this in the form of
X^5+2*X^4*a+(a^2+2b)X^3+2*a*X^2*b+X*b^2
as opposed to getting
X^5+2*X^4*a+2X^3b+a^2X^3+2*a*X^2*b+X*b^2
Is this possible? At the moment I use the Expand command in maple to generate the answer. I know this is slightly pedantic as maple is returning the correct answer but I need to build a Matrix out of this using quite a few of these polynomials.
Any h

There was a discussion on comp.soft-sys.maths.maple about how well Maple obtains the Jordan Normal Form of a (square) matrix. LinearAlgebra[JordanForm] is limited to matrices of integers, so it can make severe demands on computer memory; furthermore, in practice, one is often confronted with floating point data. However, linalg[jordan] operates on matrices of both integer and floating point data.

I have to following Maple file and from the graph that is plotted the I need to find how far each of the reflected rays falls from a common focus. Is it possible to read the values of the y-intercept of each of the refelcted rays and then either output these to a file or to directly plot a graph showing the distance each ray falls from the common focus. Thanks

Download 3259_Mirror.mwsView file details
This is a personal pet peeve.
Let A be a 2x2 matrix with elements 0.5, 0.5, 0.3, 0.7
Find A^2
Repeat with a 2x2 matrix with elements 1/2, 1/2, 3/10, 7/10.
Why does the first example give more than 2 decimals? Why is the answer to the first so inaccurate?
Is there some library besides LinAlg or LinearAlgebra I should include to handle such rudimentary calcs?

Hi,
It´s possible to call a Maple library from a module or a procedure? I try to use the command with, but Maple don´t accept that.
Thank´s
João Paulo Laudares

When I use PDEtools in Maple10 to get subscript notation of derivatives it works for equations that are assigned to another variable name. It does not work for equations that are referred to only by their Maple10-generated equation numbers. The sample case below shows the problem. It is an edited Maple-text version. I tried uploading the file, but neither Live Worksheet or HTML copy correctly display. Live Worksheet apparently doesn't access PDEtools, and the HTML copy can't handle equation number references. I can supply the test file to any one who wants it.
------------------------------------------------------------------------------

I know the 'factor' function won't do it. But is there any function available in Maple that will take for example 2*p^2 + 4 as an argument and return 2(p^2 + 2) as a result? i.e. I want to factor integer coefficients.
Thanks,
Eddie

Hi,
I was having a problem to write a Maplet for model selection. My problem is that, the variables from Combobox are not received by the procedure that should make the model selection. I am trying to apply the function parse to transform the string from ComboBox and add it to the variable that will be send to procedure FORMULCAO. Here is the code:
> with(Maplets[Elements]):
> Cond:=module()
> option package;
> local maplet;
> export Model;
> global deptemp,N, NDOM, MODE;
> use Maplets[Elements] in
> maplet := Maplet([
> [
> "Time Dependence: ",
> ComboBox['CoB1']("stationary", sort([

Hello,
I would like to define new type in my package but I don't know how. What should I change in followng code to make it work? Thank you.
Karel Srot
restart:
march('create', ".", 3);
MyModule := module() option package;
export p, `type/FS`;
`type/FS`:=proc(t); # define new type
if t=`a` then
RETURN(true);
else
RETURN(false);
end if;
end:
p:=proc(S::FS) local coeff, t;
print(1);
end proc:
end module;
savelibname := ".":
savelib('MyModule');
restart:
libname:=libname, `.`:
with(MyModule);
type(a, FS);

hi
I am new to Maple. I have been trying to solve a nonlinear equation, but have been fraught with problem. I would appreciate any help. Solution through 'solve' would be great but 'fsolve' will be ok too.
For the solve
eq:=int(E^2/(exp((E-Mu)/KT)-1), E=El..EU))
-int(E^2/(exp((E/KT)-1), E=EL..EU))=0)
Typical values of E are 10^-19; and KT is about 10^-15.

How do I solve an equation such as this:
z(t+1)=1+a*b-((a*b)/z(t))
Finite time of T periods so there is a boundary condition of z(T+1)=0. Need to solve backwards for z(t).