# Integrating a field in one coordinate

**URL:** <https://fenicsproject.discourse.group/t/integrating-a-field-in-one-coordinate/7724>\
**Category:** variational formulation\
**Created:** [February 22, 2022, 6:10pm UTC](https://fenicsproject.discourse.group/t/integrating-a-field-in-one-coordinate/7724 "2022-02-22T18:10:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arun\_Kumar](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/arun_kumar/32/3491_2.png) [@Arun\_Kumar](https://fenicsproject.discourse.group/u/Arun_Kumar)\
**Post date:** [February 22, 2022, 6:10pm UTC](https://fenicsproject.discourse.group/t/integrating-a-field-in-one-coordinate/7724/1 "2022-02-22T18:10:55Z")

</div>

I have a function f[x,y] in Fenics. I want to integrate it along y and get g[x] = \int\_(-a)^(a) f[x,y] dy, and thereafter evaluate g[x] at desired values of x. Is it possible to do it in Fenics?

A brute-force (maybe naive) way around is to evaluate f[x,y] at various values of x, y and use Gauss quadrature for integration along y. That would require writing my own code. However, I am looking for an existing Fenics functionality to do it.
