Message Boards Message Boards

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

What do the brackets [[ , , ]] at the end of a WL expression mean?

fm[f_]:=DSolve[{x''[t]+4x[t]=f,x'[t]==0,x[t]==0},x[t],t][[1,1,2]]

what does the brackets [[1,1,2]] means ?

POSTED BY: mohamed bakr
2 Replies

The function DSolve does not directly return the solution as a function. It returns a List of Rules which can contain multiple solutions.

So, after running DSolve, you have to extract the function out of the result. You can use Part. It's usually better to do it with Replace or Lookup: http://support.wolfram.com/kb/12505

POSTED BY: Sean Clarke
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