MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: wrong solution for double integral of piecewise function?


Tom Roche Feb 28, 6:43 am
>> Solve[
>>   First[
>>     Integrate[
>>       Integrate[
>>         f[\[Chi], \[Psi]], {\[Psi], -\[Infinity], \[Infinity]}
>>       ],
>>         {\[Chi], -\[Infinity], \[Infinity]}
>>     ]
>>   ] == 1, k
>> ]

>> [gets]

>> (2) {{k -> -(1/((a - b)^2 (-1 + UnitStep[a - b])))}}

Bob Hanlon
> When you integrated by hand you assumed that b > a, Mathematica
> gives a more complicated result since it does not make that
> assumption unless you tell it to do so.

and he points out that the proper way to do this is by wrapping an
Assuming around the procedure above:

Assuming[{b > a},
  Solve[
    First[
      Integrate[
        Integrate[
          f[\[Chi], \[Psi]], {\[Psi], -\[Infinity], \[Infinity]}
        ],
          {\[Chi], -\[Infinity], \[Infinity]}
      ]
    ] == 1, k
  ]
]

produces

{{k -> 1/(a - b)^2}}

Thanks!


  • Prev by Date: Re: Re: How to Export the "Manipulate"
  • Next by Date: Re: contourlabels in contour plot
  • Previous by thread: Re: Do Hershey Vector Fonts exist in Mathematica?
  • Next by thread: Re: wrong solution for double integral of piecewise function?