Message Boards Message Boards

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

ParametricNDSolveValue malfunctioning with complex numbers

Posted 10 years ago

ParametricNDSolveValue seems to have a problem with a certain combination of matrices and complex numbers. Here is a minimal example (also attached):

R[t_] = Through[#[t]] & /@ Table[Subscript[r, i, j], {i, 2}, {j, 2}];
ParametricNDSolveValue[{R'[t] == I R[t], R[0] == DiagonalMatrix[{0, n}]}, Subscript[r, 2, 2], {t, 0, 10}, {n}][1][1]
ParametricNDSolveValue[{R'[t] == I R[t], R[0] == DiagonalMatrix[{0, 1}]}, Subscript[r, 2, 2], {t, 0, 10}, {n}][1][1]
ParametricNDSolveValue[{R'[t] ==   R[t], R[0] == DiagonalMatrix[{0, n}]}, Subscript[r, 2, 2], {t, 0, 10}, {n}][1][1]

The difference between the first and the second evaluation of ParametricNDSolveValue is only that the value of n is already inserted into the DE in the second case. So the results should be the same. But they are not.

I also noticed that removing the I (third evaluation) works when n is only assigned afterwards.

Does anybody understand this? Is this a bug? Most importantly, is there a way around it?

Thanks for any input!

Attachments:
POSTED BY: Florian Leupold
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