Adri van der Meer

Adri vanderMeer

1355 Reputation

18 Badges

15 years, 147 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

Convert the lists to vectors and calculate the innerproduct:

evalf(Vector(X).Vector(ln~(Y)));

You have to remove the unevaluation quotes around cat("Element ",j)

seq( TEXT([.5*(X[B[j]]+X[EN[j]]), .5*(Y[B[j]]+Y[EN[j]])], cat("Element ", j), 
ALIGNBELOW, ALIGNRIGHT),  j = 1 .. 2 );


TEXT([0.5 X[B[1]] + 0.5 X[EN[1]], 0.5 Y[B[1]] + 0.5 Y[EN[1]]],

  "Element 1", ALIGNBELOW, ALIGNRIGHT), TEXT(

  [0.5 X[B[2]] + 0.5 X[EN[2]], 0.5 Y[B[2]] + 0.5 Y[EN[2]]],

  "Element 2", ALIGNBELOW, ALIGNRIGHT)

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

 

Replace

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

by

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 http://en.wikipedia.org/wiki/Inverse_function_theorem 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

interface(rtablesize=11);

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 

currentdir();

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:
eval(f,s~(k));

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

D(sin);

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)] );

 

5 6 7 8 9 10 11 Last Page 7 of 27