Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: automatic integral output simplification

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115192] Re: automatic integral output simplification
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Tue, 4 Jan 2011 04:23:19 -0500 (EST)

The Sin[t]^2 form appears because the coefficient of t in Cos[2 t] is  
EXACTLY 2, so the following results are to be expected:

Integrate[-8 Sin[2 t], {t, 0, t}]
Integrate[-8 Sin[2. t], {t, 0, t}]
Integrate[-8 Sin[w t], {t, 0, t}]
Integrate[-8 Sin[w t], {t, 0, t}] /. w -> 2
Integrate[-8 Sin[w t], {t, 0, t}] /. w -> 2 // Expand

-8 Sin[t]^2

-4. + 4. Cos[2. t]

(8 (-1 + Cos[t w]))/w

4 (-1 + Cos[2 t])

-4 + 4 Cos[2 t]

Bobby

On Mon, 03 Jan 2011 02:57:03 -0600, sean k <seaninsocal at gmail.com> wrote:

> Hello group,
>
> I want to get around the way Mathematica simplifies the output of an
> integral.
>
> For instance, Let's say you want to integrate -8 sin(2t) from t = {0,
> t}
>
> int1 = \[Integral]-8 Sin[2 t] \[DifferentialD]t
> ul1 = int1;
> ll1 = int1 /. t -> 0;
> ul1 - ll1
>
> yields the correct output.
>
> -4 + 4 Cos[2 t]
>
> But if i pose that integral with limits included in it, Mathematica
> outputs
>
> Integrate[-8 Sin[2 t], {t, 0, t}]
>
> -8 Sin[t]^2
>
> Now both these are correct, except when the definite integral is
> evaluated, "mathematicamagic" kicks in.
>
> My guess is that the coefficient in the argument for the sin function
> is the culprit. What should I do here to make the Mathematica retain
> the "2 t" inside the Sin?
>
> Thanks in advance for any insights.
>
> Sean
>
>
>
>
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Mathematica daily WTF
  • Next by Date: Re: Mathematica daily WTF
  • Previous by thread: Re: automatic integral output simplification
  • Next by thread: NDSolve, three 2-d order ODE, 6 initial conditions