Adri van der Meer

Adri vanderMeer

1400 Reputation

19 Badges

20 years, 135 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

Since sin is a procedure itself:

S2 := sin@(proc(x) x^2 end proc):
S2(y);
                               / 2\
                            sin\y /

Of course the output of your proc must be suitable as input for sin.

But is your proc produces a list, a Vector of a Matrix, use:

sin~@(proc(x) ... end proc)

(1) Use worksheet mode (not document mode)

(2) Use Maple notation for input display to get copyable input:
     Choose: Tools → Options → Display → Input Display: Maple Notation

or: upload a complete worksheet (*.mw file) by using the green upward arrow in the Mapleprimes texteditor.

Use the continuity of f by substituting a+b=1:

F := unapply( subs( b=1-a, f(x) ), x ):
limit((F(x)-F(1))/(x-1), x = 1, right);
                               -1
limit((F(x)-F(1))/(x-1), x = 1, left);
                              2 a

Little chance to find a parametrization with linear functions of the nonlinear surface c=0.

What's wrong with x2 =

k := -x2^3+x1^3+x0*x1^2 = 0:
RealDomain:-solve(k,x2): X2 := convert(%,surd);
plot3d([x0,x1,X2], x0=-1..1, x1=-1..1 , axes=boxed );

So your parametrization could be: x0=u, x1=v, x2=surd(v^2*(u+v), 3)

with(plots):
s := [seq( plot3d( 1-z^2, theta=0..t, z=-0.8..0.8, coords=cylindrical ),
 t=0..evalf(2*Pi),evalf(Pi/50) )]:
display(s, insequence=true );

solve( {x+y+z=6, x^2+y^2+z^2=14, x^3+y^3+z^3=36} );

and select the right solution by hand

simplify( sum( (-1)^k*binomial(n,k)/(k+1), k=0..n ) );
f := proc(i,j)
  if (i=j and i<=80) then 2*i
  elif ((j=i+2 and i<=78) or (j=i-2 and i>=3 and i<=80))then i/2
  elif ((j=i+4 and i<=76) or (j=i-4 and i>=5 and i<=80))then i/4
  else 0
  end if;
end proc:
 
A := Matrix(100,f);

See ?rtable_indexing functions to create such a matrix.

numtheory:-divisors(120);
   {1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120}

I don't understand why, but there seems to exist two instances of a: a global and a local.

In the procedure f, the name a is a parameter. This means that when you call f(2), every instance of a in the body is replaced by its value 2 (think that the procedure should operate in exactly the same way if you had used b instead of a!) . So you have to evaluate eq1 and eq2 with its variable a replaced by the actual value of the procedure-parameter a.  The variable a in eq1 and eq2 is "outside" the procedure, and can inside the procedure  refered to by :-a

restart; B := 53*Pi*(1/180): e := 3:
eq1 := -2.005689708*a:
eq2 := -2.005689708*a+5.369606170:
f := proc (a)
  if a <= 0 then 0
  elif a <= evalf(e*sin((1/2)*B)) then eval(eq1,:-a=a)
  elif a <= evalf(2*e*sin((1/2)*B)) then eval(eq2,:-a=a)
  else 0
  end if
end proc:
f(2);
                          1.358226754

Bovril.mw

(1) supply a restart at the beginning

(2) replace "binom" by "binomial"

calculationHDN.mw

See ?dsolve,numeric

DE := (x+b*y(x))*diff(y(x),x) + y(x) = 0;
BC := y(1)=1:
b := 0.1:
sol := dsolve( {DE,BC}, y(x), numeric, output=listprocedure );
Y := subs( sol, y(x) );
Y_vals := [seq(Y(x),x=0..1,0.1)];

for i to 8 do
  if i<>3 then print(i) end if;
end do ;

Make an animation, for instance:

restart; with(plots):
animate( plot, [cos(x-t), x=-2*Pi..2*Pi], t=0..20 );

right click on the picture and export as GIF. This can be used in MSppt.

First 10 11 12 13 14 15 16 Last Page 12 of 27