Re: wrong solution for double integral of piecewise function?
- To: mathgroup at smc.vnet.net
- Subject: [mg96987] Re: wrong solution for double integral of piecewise function?
- From: Tom Roche <tlroche at gmail.com>
- Date: Sun, 1 Mar 2009 04:55:37 -0500 (EST)
- References: <gob80u$g9q$1@smc.vnet.net>
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!