Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Difference between the following integrals....

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66149] Re: [mg66134] Difference between the following integrals....
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Mon, 1 May 2006 01:30:35 -0400 (EDT)
  • References: <200604300821.EAA17220@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 30 Apr 2006, at 17:21, ashesh wrote:

> Hi all,
>
> Would like to integrate Abs[x]*(x+3y^2) for {x,-2,2} and {y,-1,2}.  
> Have
> four different ways of doing this integration as follows:
>
> f1 = Abs[x](x + 3y y);
> Integrate[f3, {x, -2, 2}, {y, -1, 2}]
>
> f2[a_, b_] := Piecewise[{{a*(a + 3*b*b), a > 0}, {-a*(a + 3*b*b), a <
> 0}}]
> ii = Integrate[f2[a, b], {a, -2, 2}, {b, -1, 2}]
>
> f3[p_, q_] := Which[p < 0, -p*(p + 3*q*q), p > 0, p*(p + 3*q*q)]
> Integrate[f3[p, q], {p, -2, -2}, {q, -1, 2}]
>
> f4 = int_m_-2^0 int_n_-1^2 (-m*(m+3n^2)) dn dm + int_m_-2^0 int_n_-1^2
> (m*(m+3n^2)) dn dm
>
> Answers:
>
> f1 = 36
>
> f2 = 36
>
> f3 = 0
>
> f4 = 36
>
> As I understand all these 4 are performing the same operation, but why
> does f3 become = 0.
>
> Hope some one can give me an insight into the mistake (please identify
> the mistake too for me) I am making here.
>
> Regards.
>

Look carefully at your definition of f3. {p, -2, -2} ?

Andrzej Kozlowski
Tokyo, Japan


  • Prev by Date: Re: Difference between the following integrals....
  • Next by Date: Re: Conditions with Statistical Functions
  • Previous by thread: Re: Difference between the following integrals....
  • Next by thread: hotkeys in linux