Mathematica Integration of Numerical Solution Mathematica

AI Thread Summary
The discussion revolves around using Mathematica to integrate solutions from coupled differential equations solved with NDSolve. The user initially struggles to find guidance in the documentation, which primarily addresses analytical functions. They successfully plot their solutions using the syntax "/.s" and receive advice to replace "Plot" with "NIntegrate" for integration. After implementing this, the user encounters an issue with their numerical results being enclosed in curly brackets, leading to a question about how to remove them. A solution is suggested, indicating that using "First[{100.00}]" will yield the desired output without brackets.
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

Back
Top