For example we have the equation $y^2+\sin({4y\cos{x}})=4$
You can see the graph here at:
https://www.desmos.com/calculator/1sxvfl2amd
So far I know it is split into top and bottom. I'm trying to find the area below the relation at the top, positive area region to the x-axis. Even if I isolate x to equal y or y to equal x, it still won't be a solvable integral.
I think I could compute the area numerically using the Riemann sum, but how can I use it specifically for the positive top, without isolating any variables. I'll fill in the limits from ${a<x<b}$, and/or $c<y<d$ of the integral to solve the rest myself, but I'm not sure how to?
Best Answer
Since you are going to do the integral numerically, there is no loss in finding $y$-values numerically as well. Since the function you integrate is $2\pi$-periodic, and you want to integrate it over its period $[0,2\pi]$, there is no need for advanced methods like Simpson's rule or Gaussian quadrature; the simple left endpoint rule will do just fine.
Here is for Sage, which can be used online (in a browser), free of charge. It follows the logic of the Scilab code given below (which I commented in detail).
The only difference, besides syntax, is that Sage asks for an interval in which to look for the root. I gave it $[ 1.5, 2.5]$, because your plot shows that the solution is in this range.
Here is code is for Scilab (requires installation, but is free), Text after
//
are my comments.Output: $12.567055628$. I got the same answer for $n=2000$ subintervals, so it looks accurate.
Not coincidentally, this is close to $4\pi$, because the values of the function are close to $2$ on average.