Adri van der Meer

Adri vanderMeer

1350 Reputation

18 Badges

14 years, 294 days
University of Twente (retired)
Enschede, Netherlands

My "website" consists of a Maple Manual in Dutch

MaplePrimes Activity

These are answers submitted by Adri van der Meer

plots:-textplot( [M2,1.15*P2,typeset(``(M2,1.15*P2))] );



y[0] := (1/4)*Pi;


y[0] := evalf((1/4)*Pi);

If you don't care about the values of the piecewise function for x<xmin or x>xmax , then the easiest way is:

f := CurveFitting:-Spline([[0,2],[3,-2],[7,6],[9,5]], x, degree=1 );

Your example is a function R3R2,, so there cannot exist an inverse.
See for more information.

Because the number of rows is not fixed in advance, you can better build a sequence of rows. Not that I also made your global R local:

S := proc (x, a, b, s)
  local R; global y;
  R := NULL: # initialization
  for y from a by s to b while y < 1
  do R := R, [y,ListTools:-FindMinimalElement(select(type, [fsolve(f(x) = 0)], positive ))] # the next row
  end do;
  Array([R]) # form the Array as output

  end proc;

Now you can get the Array by

R := S(...);

What do you mean by "evaluate"? If you want to view the entries of the matrix, right click on the output and choose "browse" , or make the maximum size of shown matrices larger by


There are two other problems:

(1) You use e^... for exponentials. This must be: exp(...)

(2) There is an undefined function vb

(1) Are the first two lines meant as assignments? Then you have to use z1 := ... instead of z1 = ...

(2) z1 and z2 are lists (not matrices), consisting of 10 elements. In eq1 you have powers of  z1 and z2 , so these must be square matrices. But what do you mean by the square root of a matrix?


The command 


returns the desired string

The solution of the ODE is given in implicit form. So you can use implicitplot to plot solutions for different values of _C1:

plots:-implicitplot( [s], x=-4..4, y=-4..4, gridrefine=2 );

You must substitute x2=1/x2b etc. for all variables in the denominator. So try:

k := indets(denom(f)):
s := a -> a=1/a||b:

The packages LinearAlgebra and Groebner both have a command "Basis".  You load LinearAlgebra after Groebner, so when Basis is used, it is the LinearAlgebra-version. So: omit the statement with(LinearAlgebra) - don't forget to restart -, or, if you need both packages, do:

Groebner:-Basis( ...

Because D is the name of the differential operator, try for instance


see ?D

So, use another symbol instead of D.


I assume that diff(Q(t),t) is meant to be the positive sqrt of diff(P(t),t). You need an initial value.
For example a value a, such that Q(a)=0:

  P := t -> t*ln(t)^(-b);
  Q := t -> Int( sqrt( D(P)(tau) ), tau=a..t );

To make a (parametric) plot, you need numerical values for a and b:

  a := 3.0: b:=1.0:
  plot( [evalf(Q(t)),1/P(t)^2, t=a..20], labels=["Q",typeset(1/` P`^2)] );


(1) Don't use Re as the name of a variable (because it means the real part of a complex number)

(2) You mistyped a " * " for a comma in the solve command.

sys := {Reyn = ID*V/nu, hl = (f*L/ID+Kl)*V^2/(2*9.81),        
            Vflow = (1/4)*Pi*ID^2*V, Hrequired = alpha*V^2/(2*9.81)+hl,
           Hrequired = -a*Vflow^2+Ho, 1/sqrt(f) = -1.8*log[10](6.9/Reyn+(E/(3.7))^1.11)};

solve(sys, {Reyn, V, f, hl, Vflow, Hrequired});

You seem only want to read just one maple expression. I think that ImportMatrix is not the most appropriate command for that.

A := parse(readline("ConservationEq.txt"));
5 6 7 8 9 10 11 Last Page 7 of 27