Message Boards Message Boards

0
|
3783 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Output of Piecewise is not as expected

Posted 5 years ago

Hi there, I just played around a bit with calculating derivatives of parametric curves keeping the order as a variable and found a strange behaviour. When typing

line[t_] := {p1 + a t, p2 + b t}
D[line[t], {t,0}]

the output is

{p1 + a t, p2 + b t}

as one would expect.

However, when typing

D[line[t], {t,k}]

with variable k, then the result is

output of piecewise

so in case of k=0, the constant terms p1 and p2 are missing. Maybe I don't understand it right, but it looks like a bug to me, right?

BTW: I'm using Wolfram Language 12 (Linux) but the behaviour is the same in Wolfram Cloud.

Best regards Volker

POSTED BY: Volker Sachse
2 Replies
Posted 5 years ago

Hello Sjoerd, thank you very much for your quick response.

Best regards Volker

POSTED BY: Volker Sachse

Looks like a bug to me. I would expect

D[{p1 + a t, p2 + b t}, {t, k}] /. k -> 0

to return the same as

D[{p1 + a t, p2 + b t}, {t, 0}]

I'll go ahead and report it.

POSTED BY: Sjoerd Smit
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract