Find the intersection of 2 curves & the area under the curve to the right of the intersection w / Mathematica

I have 2 curves illustrated with the following Mathematica code:

Show[Plot[PDF[NormalDistribution[0.044, 0.040], x], {x, 0, 0.5}, PlotStyle -> Red],
 Plot[PDF[NormalDistribution[0.138, 0.097], x], {x, 0, 0.5}]]

Mathematica graphics

I need to do 2 things:

  • Find the x and y coordinates where the two curves intersect and
  • Find the area under the red curve to the right of the x coordinate in above the intersection.

I had not done this kind of problem in Mathematica before and found no way to do this in the documentation. Not sure what to look for.

+3
source share
1 answer

You can find where they intersect with Solve (or can use FindRoot).

intersect = 
 x /. First[
   Solve[PDF[NormalDistribution[0.044, 0.040], x] == 
     PDF[NormalDistribution[0.138, 0.097], x] && 0 <= x <= 2, x]]

Out [4] = 0.0995521

Now take the CDF to this point.

CDF[NormalDistribution[0.044, 0.040], intersect]

Out [5] = 0.917554

, x = 0 -infinity; . CDF, x = 0.

FindRoot

intersect = 
 x /. FindRoot[
   PDF[NormalDistribution[0.044, 0.040], x] == 
    PDF[NormalDistribution[0.138, 0.097], x], {x, 0, 2}]

Out [6] = 0.0995521

- , , . CDF - , PDF .

Wolfram Research

+10

Source: https://habr.com/ru/post/1789813/


All Articles