Adri van der Meer

Adri vanderMeer

1400 Reputation

19 Badges

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

See the errormessage! If L is a list, ist first element is L[1], not L[0].

standard worksheet mode, 1D Maple input

Tangentlinrev1.mw

The attachment contains only a picture. Is that the only form you have? I 'm afraid that it is impossible to extract the data from a picture.

If you have the data as numbers, see ?readdata. For plotting: see ?pointplot or ?listplot.

This kind of surfaces can better be plotted by using spherical coordinates:

plot3d( 5, theta=0..2*Pi, phi=0..Pi/2, coords=spherical, axes=boxed, scaling=constrained );
restart;
para := proc(i,new)
  # new = 0 or 1
  seq(log(p[j,i]/(1-p[j,i]))=mu+tau[j]+eta[i] + new*tau[j]*eta[i],j=2..4)
end proc:
ans:=solve({para(1,1)},[seq(p[j,1],j=2..4)]);

subs( op(ans), p[2,1] );

or

assign(op(ans));

To create a column vector of the none zero entries in "UpperTriangle(m) you can do:

 with(ArrayTools):
m:=<1,2,3,4|3,2,1,0|x,y,z,z0|a,a,a,a|b,b,b,b>;
lscol:=<seq(1-AddAlongDimension(m,2)[i],i=1..4)>;
m:=<m|lscol>;
M := UpperTriangle(m);
V := Vector( convert( select( x -> x<>0, M ), list ) );

I see no way to quickly reconstruct the upper triangle matrix form the vector V

f := x -> piecewise( x<=20,  sqrt(x + 5*sin(x)), undefined ): f(x);

but this doesn't help you very much, because f is also not defined if x + 5*sin(x) < 0.
Of course you can calculate the zeros of the derivative:

 diff( f(x), x): solve(%,{x}, AllSolutions=true);
           /           /   (1/2)\                \   
          { x = -arctan\2 6     / + Pi + 2 Pi _Z2 },
           \                                     /   

             /          /   (1/2)\                \
            { x = arctan\2 6     / - Pi + 2 Pi _Z2 }
             \                                    /
about(_Z2);
Originally _Z2, renamed _Z2~:
  is assumed to be: AndProp(integer,RealRange(-infinity,2))

The function is not defined at x=1 and at x=-1 because of a division by zero:

restart;
f := x -> ((1/(1-x^2))^(1/2))*(sin((1-x)^(1/2))):
f(1);
Error, (in f) numeric exception: division by zero
limit( f(x), x=1 );
                           undefined

The discontinuity cannot be removed

 limit( f(x), x=1 );
                           undefined
limit( f(x), x=1, left );
                            1  (1/2)
                            - 2     
                            2       
limit( f(x), x=1, right );
                             1  (1/2)
                           - - 2     
                             2       
plot(f(x), x=-2..2, discont=true );

As you see, the graph is not plotted for x ≤ -1

 limit( f(x), x=-1, right );
                            infinity
f(-2);
                     1    (1/2)    / (1/2)\
                     - I 3      sin\3     /
                     3                     

This is not a real number.
But if we define

 h := x -> sin(sqrt(1-x))/sqrt(1-x^2):
limit( h(x), x=1);
                            1  (1/2)
                            - 2     
                            2       
plot(h,-2..2);

This function seems to be continuous at x=1!
There seems to be a bug in the evaluation of f(x) for x ≥ 1:

 p := sin( I*sqrt(x-1) );
                            /       (1/2)\
                      I sinh\(x - 1)     /
q := 1/(I*(x^2-1)^(1/2));
                                I       
                        - --------------
                                   (1/2)
                          /      2\     
                          \-1 + x /     
p*q;
                           /       (1/2)\
                       sinh\(x - 1)     /
                       ------------------
                                  (1/2)  
                         /      2\       
                         \-1 + x /       

This is positive if x > 1

eldkey.mw

I suppose that the parametrisation is intended to be

XY := {x=cos(t)/(1+sin(t)^2), y=sin(t)*cos(t)/(1+sin(t)^2)};

(I take a=1).
This can be substituted in the equation to get

c := (x^2+y^2)^2=x^2-y^2:
simplify(subs(XY,c)): is(%);
                              true

To get the polar representation you only have to substitute the polar coordinates in the equation:

 p := subs( {x=r*cos(t), y=r*sin(t)}, c ):
combine(p);
                         4    2         
                        r  = r  cos(2 t)

 Now I understand the problem! Multiple assignment to a vector causes different names pointing to the same object.

This doesn't work:

restart;

v1,v2,v3,v4,v5 := Vector(3)$5:

v1[1] := 3: v2[3]:=1 :v5[2]:=-4:

v1,v2,v3,v4,v5;

Vector(3, {(1) = 3, (2) = -4, (3) = 1}), Vector(3, {(1) = 3, (2) = -4, (3) = 1}), Vector(3, {(1) = 3, (2) = -4, (3) = 1}), Vector(3, {(1) = 3, (2) = -4, (3) = 1}), Vector(3, {(1) = 3, (2) = -4, (3) = 1})

(1)

So you have to do:

restart;

for i to 5 do v||i := Vector(3) end do:

v1[1] := 3: v2[3]:=1 :v5[2]:=-4:

v1,v2,v3,v4,v5;

Vector(3, {(1) = 3, (2) = 0, (3) = 0}), Vector(3, {(1) = 0, (2) = 0, (3) = 1}), Vector(3, {(1) = 0, (2) = 0, (3) = 0}), Vector(3, {(1) = 0, (2) = 0, (3) = 0}), Vector(3, {(1) = 0, (2) = -4, (3) = 0})

(2)

 

Download hossayni.mw

Even in the name of god five vectors in R3 cannot be independent.

simplify( csc(theta)^2 - cot(theta)^2 );
                               1

A function is one-to-one if the equation f(x) = f(y) implies x=y. So, in your example, you did all the necessary calculations.

f := x -> x^2 + 5:
solve( f(x)=f(y), {x} );
                       {x = y}, {x = -y}

so f is not one-to-one.
But if you restrict to the positive reals:

solve( {f(x)=f(y), x>0,}, {x} ) assuming y>0;
                {x = y}

(exactly one solution).

No problem with epsilon.
Perhaps you can better use "Maple notation" for input display.

epsilon.mw

Why don't you want to use numerics? The exact solution is a very complicated formula, and moreover, you assign numeric values to all parameters. I think that you want to have "formula's" for u1(t), etc. Use the option "output=listprocedure": in the dsolve command.

csol := dsolve({IC, Sys}, {u1(t), u2(t), u3(t)}, numeric, output=listprocedure );
p1 := subs(csol, u1(t)):
p2 := subs(csol, u2(t)):
p3 := subs(csol, u3(t)):
plot([p1, p2, p3], 0 .. 50*Pi, color = [red, blue, green], labels = ['t', 'u(t)'],
    title = "red=First Floor,blue=Second Floor,green=Third Floor");

Beware that p1, p2, p3 are procedures, so you must give the plotrange as 0..50*PI, not as t=...0..50*Pi.

Now you can also calculate things as

 fsolve( p1(t)=0, t=1..10 );
                          8.699485923

First 17 18 19 20 21 22 23 Last Page 19 of 27