Integration of Numerical Solution Mathematica

Click For Summary

Discussion Overview

The discussion revolves around the integration of numerical solutions obtained from solving coupled differential equations using Mathematica's NDSolve function. Participants explore methods for integrating these numerical solutions over a specified range, addressing challenges related to the output format.

Discussion Character

  • Technical explanation, Homework-related

Main Points Raised

  • One participant expresses difficulty in integrating numerical solutions in Mathematica after using NDSolve, noting that the documentation primarily addresses analytical functions.
  • Another participant suggests that if the solutions can be plotted, they should also be integrable, recommending the use of NIntegrate in place of Plot.
  • A participant confirms they successfully integrated the solutions but encounters an issue with the output format, specifically that the results are enclosed in curly brackets.
  • Another participant proposes a method to extract the numerical value from the curly brackets by using the First function.

Areas of Agreement / Disagreement

The discussion appears to be largely resolved regarding the integration process, but there is an ongoing concern about the output format, with no consensus on the best approach to handle it.

Contextual Notes

Participants do not clarify the specific range for integration or the nature of the coupled differential equations, which may affect the integration process. The discussion also does not address potential limitations of the numerical methods used.

Who May Find This Useful

Users of Mathematica, particularly those working with numerical solutions of differential equations and seeking integration techniques.

Livethefire
Messages
49
Reaction score
0
I am kind of new to mathematica, and have checked the documentation but can't seem to find an answer.

I have solved 3 coupled differential equations using NDSolve.

I wish to integrate the solutions over a range but I'm not sure how to do it - the documentation seems to deal only with analytical functions. If anyone could point me in the right direction, that would be great.

(I have called my solutions "s" and was able to plot them using "/.s", I would imagine I will have to use something like this again)
 
Physics news on Phys.org
If you can plot them you should be able to integrate them. Simply plot over the region you want to integrate, then replace "Plot" with "NIntegrate".
 
Thanks, Yeah I got it working.

There are curly brackets around my numerical results though :

Output: {100.00}

Anyway to get rid of them?
 
First[{100.00}] will give you 100.00
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K