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

MathGroup Archive 2010

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

Search the Archive

Re: Expanding Integrals with constants and 'unknown' functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110068] Re: Expanding Integrals with constants and 'unknown' functions
  • From: "David Park" <djmpark at comcast.net>
  • Date: Tue, 1 Jun 2010 04:20:45 -0400 (EDT)

The Presentations package ($50) from my web site has functionality for this.
The Student's Integral section allows you to write integrate[...] (small i)
instead of Integrate[...] and obtain the integral in a held form. There are
then commands to manipulate the integral (operating on the integrand, change
of variable, integration by parts, trigonometric substitution, and breaking
the integral out) and then evaluate using Integrate, NIntegrate, or a custom
integral table. Also, you can pass any assumptions at the time you use
Integrate, instead of when the integral is initially written, so it always
formats nicely.
 
The following code also uses another Presentations routine,  MapLevelParts,
that allows you to apply an operation to a subset of level parts in an
expression - here the two integrals that can be evaluated without asking
Mathematica to evaluate the integral with the undefined function. I copied
the output as text, with box structures, so if you copy from the email back
into a notebook is should format as a regular expression.

Needs["Presentations`Master`"] 

integrate[a + z + s[z], {z, clow, chigh}] 
% // BreakoutIntegral 
% // MapLevelParts[UseIntegrate[], {{1, 2}}] 

\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(clow\), \(chigh\)]\(\((a + z +
s[z])\) \[DifferentialD]z\)\) 

a \!\(
\*SubsuperscriptBox[\(\[Integral]\), \(clow\), \(chigh\)]\(1
\[DifferentialD]z\)\)+\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(clow\), \(chigh\)]\(z
\[DifferentialD]z\)\)+\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(clow\), \(chigh\)]\(s[z]
\[DifferentialD]z\)\) 

chigh^2/2+a (chigh-clow)-clow^2/2+\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(clow\), \(chigh\)]\(s[z]
\[DifferentialD]z\)\) 


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: Jesse Perla [mailto:jesseperla at gmail.com] 

I have an integral involving constants and an 'unknown' function.  I
would like to expand it out to solve for the constants and keep the
integrals of the unknown function as expected.
i.e.
Integrate[a + z + s[z], {z, clow, chigh}]

I want to get out:
(a*chigh + chigh^2/2 - a*clow - clow^2/2) + Integrate[s[z], {z, clow,
chigh}]

However, FullSimplify, etc. don't seem to do anything with this.  Any
ideas?




  • Prev by Date: Re: Basic normal and t table questions
  • Next by Date: Re: Assigning values to a list.
  • Previous by thread: Re: Expanding Integrals with constants and 'unknown' functions
  • Next by thread: Re: Problems running Mathematica and WordMS together in Win7