Hopefully this isn't a FAQ.
Is it possible to get Mathematica (3.0) to assume that n is an even
number for an indefinite integral?
Rod Pinna
(rpi...@XcivilX.uwa.edu.au Remove the X for email)
> Hopefully this isn't a FAQ.
>
> Is it possible to get Mathematica (3.0) to assume that n is an even
> number for an indefinite integral?
Good to see a posting from the University of Western Australia! It is a
FAQ but the answer is, briefly, no. A recent and related question was:
>I want to make an assignment T = k/omega and somehow cause Mathematica
>to know that k is an integer. How do I do this?
In my opinion, the best way to is using pattern-matching and replacement
rules (see The Mathematica Journal 2(4): 31). E.g., for n integral, we
have
{Cos[(n_)*Pi] -> (-1)^n, Sin[(n_)*Pi] -> 0};
Please post your integral so that perhaps readers can make other
suggestions.
Cheers,
Paul
____________________________________________________________________
Paul Abbott Phone: +61-8-9380-2734
Department of Physics Fax: +61-8-9380-1014
The University of Western Australia Nedlands WA 6907
mailto:pa...@physics.uwa.edu.au AUSTRALIA
http://www.pd.uwa.edu.au/~paul
God IS a weakly left-handed dice player
____________________________________________________________________
Another possibility is to use the Assumptions option in the Integrate
command. I have not experimented with it, but there may be a way. --
Remove the _nospam_ in the return address to respond.
>Good to see a posting from the University of Western Australia! It is a
>FAQ but the answer is, briefly, no. A recent and related question was:
Just trying to keep busy over the break....
Thanks for the responses
>In my opinion, the best way to is using pattern-matching and replacement
>rules (see The Mathematica Journal 2(4): 31). E.g., for n integral, we
>have
>
> {Cos[(n_)*Pi] -> (-1)^n, Sin[(n_)*Pi] -> 0};
>
>Please post your integral so that perhaps readers can make other
>suggestions.
The above integral is pretty close to what I'm looking at actually.
Say I have
w1=A1*Sin[n*t]*(Cos[(1/2)*m*\[Pi]*x/L]-1)
v1=A3*Cos[n*t]*Sin[m*\[Pi]*x/L]
Then with
Et1=(1/a)*(D[v1,t]+w1)
The integral is
\!\(V12 =
\[Integral]\_0\%L
\(\[Integral]\_0\%\(2*\[Pi]\)Et1\^2\ \[DifferentialD]t
\[DifferentialD]x\)\)
(Apologies for the rather horrid formatting above)
i.e. Integrate[Integrate[Et^2,{x,0,L}],{t,0,2*pi}]
And a few integrals of that type. Some of the results given then have
cosine terms which are equivalent.
I've used ReplaceAll to replace one with the other. If there isn't a
better way, that should be ok.
Thanks for the help.