Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

Hello,

I'd like to ask, if I get an expression like

ex:=\int{A}{x}; ∫(A, x)

is it possible somehow extract A to have

ex:=A; A

I compute adjoint differential operators and use integral only to be able to use 'integrate_by_parts'.

Thank you!

in General questions by (510 points)

1 Answer

+1 vote
 
Best answer

Do

arg = ex[0];

to get arg to be a Cadabra expression containing only the argument of the integral (note: use '=' here, not ':=', as the right-hand side is Python, not maths).

by (83.1k points)
selected by
...