Adri van der Meer

Adri vanderMeer

1350 Reputation

18 Badges

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

My "website" consists of a Maple Manual in Dutch

MaplePrimes Activity


These are replies submitted by Adri van der Meer

@Preben Alsholm, you are right. If theta is close to n*Pi, the function is the difference of two terms that both tend to infinity. So there is little chance that approximated values will be close to the limit value 1:

f := theta -> csc(theta)^2 - cot(theta)^2:
Digits=50: [evalf( seq(Pi+10^(-n), n=1..10) )]: f~(%);
  [0.99999996, 1.000001, 1.0000, 1.00, 0., 0., 0., 0., 0., 0.]


@Preben Alsholm, you are right. If theta is close to n*Pi, the function is the difference of two terms that both tend to infinity. So there is little chance that approximated values will be close to the limit value 1:

f := theta -> csc(theta)^2 - cot(theta)^2:
Digits=50: [evalf( seq(Pi+10^(-n), n=1..10) )]: f~(%);
  [0.99999996, 1.000001, 1.0000, 1.00, 0., 0., 0., 0., 0., 0.]


OK, graphing is not a genuine proof method, but here is a problem. The function doesn't exist for θ = k π, but for example

limit( csc(theta)^2 - cot(theta)^2, theta=Pi );
                               1

The singularities are removable, and therefore we try

 plot( csc(theta)^2 - cot(theta)^2, theta=0..2*Pi, discont=[showremovable]  );

Now we see vertical lines in the graph (Maple 16), that dont't belong there.
I think this is a bug.

OK, graphing is not a genuine proof method, but here is a problem. The function doesn't exist for θ = k π, but for example

limit( csc(theta)^2 - cot(theta)^2, theta=Pi );
                               1

The singularities are removable, and therefore we try

 plot( csc(theta)^2 - cot(theta)^2, theta=0..2*Pi, discont=[showremovable]  );

Now we see vertical lines in the graph (Maple 16), that dont't belong there.
I think this is a bug.

@Sofey What do you want to plot? Perhaps you can upload your worksheet (use the green up-arrow)

@Sofey What do you want to plot? Perhaps you can upload your worksheet (use the green up-arrow)

If you define g as

g := (a,b) -> s;

g := (a, b) → s

the right hand side is unevaluated in this definition.
So, when you apply g on the arguments 1,2 this results in the value s, and this evaluates to a/b.
Now, if you use unapply to define g:

g := unapply(s,a,b);
                        
              g := (a, b) → a/b

first s is evaluated to a/b, and this expression is converted to a function of the variables a,b.

If you define g as

g := (a,b) -> s;

g := (a, b) → s

the right hand side is unevaluated in this definition.
So, when you apply g on the arguments 1,2 this results in the value s, and this evaluates to a/b.
Now, if you use unapply to define g:

g := unapply(s,a,b);
                        
              g := (a, b) → a/b

first s is evaluated to a/b, and this expression is converted to a function of the variables a,b.

@Markiyan Hirnyk , of course you are right! (I will correct it)

@Markiyan Hirnyk , of course you are right! (I will correct it)

Unfortunately not well documented in ?DEplot, but you can always(?) use capitals for the options to avoid this kind of confusion:

DEplot(deq1,x(t),t=-.5..4,x=-0.2..2,IC,linecolor=BLACK,thickness=3,arrows=LINE);

@AliKhan Try to invent conclusive tests for your procedure. For instance, does  eti(1,2) return what you expect?

By the way, your second line needs parentheses:

if not( type(m, integer) and type(k, integer)) then return 'procname(args)' end if;

if `not`(`and`(type(m, integer), type(k, integer))) then return 'procname(args)' end if

@AliKhan Try to invent conclusive tests for your procedure. For instance, does  eti(1,2) return what you expect?

By the way, your second line needs parentheses:

if not( type(m, integer) and type(k, integer)) then return 'procname(args)' end if;

if `not`(`and`(type(m, integer), type(k, integer))) then return 'procname(args)' end if

See this Guide To Handle Complicated Variable Names :
Example:

plot( 1-x^2, x=-1.2..1.2, 
tickmarks=[[seq(0.2*(i-6)=typeset(x[i]^(2+i)), i=0..12)],
[0.4=typeset(`#mover(msup(mi("a"),mn("0")),mo("¯"))`),
0.6=typeset(`#msub(mover(mi("C"),mo("^")),mn("alpha"))`)]] );

" ¯ " is a HTML-entity.
(If you want a C-hat, you dont't have to use a C-bar!)

See this Guide To Handle Complicated Variable Names :
Example:

plot( 1-x^2, x=-1.2..1.2, 
tickmarks=[[seq(0.2*(i-6)=typeset(x[i]^(2+i)), i=0..12)],
[0.4=typeset(`#mover(msup(mi("a"),mn("0")),mo("¯"))`),
0.6=typeset(`#msub(mover(mi("C"),mo("^")),mn("alpha"))`)]] );

" ¯ " is a HTML-entity.
(If you want a C-hat, you dont't have to use a C-bar!)

First 6 7 8 9 10 11 Page 8 of 11