1
$\begingroup$

how do I find some terms in an integral containing some expression, e.g. in

$$ \int \int \int \beta\phi(x,y,z) + \gamma\omega(x,y,z)\,\textrm{d}x\textrm{d}y \textrm{d}z +\int \int \alpha\phi(x,y,z) + \gamma\theta(x,y,z)\,\textrm{d}x\textrm{d}y $$

only the term including $\phi(x,y,z)$ (incl. integrals), meaning:

$$ \int \int \int \beta\phi(x,y,z) \textrm{d}x \textrm{d}y \textrm{d}z +\int \int \alpha\phi(x,y,z) \textrm{d}x\textrm{d}y\quad? $$

The approaches I found online so far don't work, help would be greatly appreciated.

$\endgroup$
2
  • $\begingroup$ What approaches have you tried? What is the problem with the code you’re using? Is this a question about the software Mathematica? You can get help with a mathematics problem at math.stackexchange.com. $\endgroup$ – creidhne Dec 20 '20 at 15:20
  • $\begingroup$ I meant how do I achieve this with Mathematica? I've tried different approaches with Select, MemberQ, Coefficient, etc. $\endgroup$ – MathsNoob69 Dec 20 '20 at 15:25
2
$\begingroup$
(int1 = Integrate[β ϕ[x, y, z] + γ ω[x, y, z], z, y, x] +
    Integrate[α ϕ[x, y, z] + γ θ[x, y, z], y, x]) //
 TraditionalForm

enter image description here

(int2 = int1 /. {_ω :> 0, _θ :> 0}) // TraditionalForm

enter image description here

Or

(int3 = int1 /. 
    Integrate[a_*phi_ϕ + b___, var__] :> 
     Integrate[a*phi, var]) // TraditionalForm

enter image description here

int2 === int3

(* True *)
$\endgroup$
1
  • $\begingroup$ This unfortunately is not what I meant, as I don't actually know what the other terms look like - $\omega$ and $\Theta$ were just placeholders. $\endgroup$ – MathsNoob69 Jan 2 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.