# Problem with variational form

**URL:** <https://fenicsproject.discourse.group/t/problem-with-variational-form/4931>\
**Category:** variational formulation\
**Created:** [January 19, 2021, 5:30pm UTC](https://fenicsproject.discourse.group/t/problem-with-variational-form/4931 "2021-01-19T17:30:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bacsieboy](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/bacsieboy/32/1447_2.png) [@bacsieboy](https://fenicsproject.discourse.group/u/bacsieboy)\
**Post date:** [January 19, 2021, 5:30pm UTC](https://fenicsproject.discourse.group/t/problem-with-variational-form/4931/1 "2021-01-19T17:30:13Z")

</div>

Hi, I have a PDE (L\_{loc} = 1)

\frac{\partial P}{\partial L}(a,L) = \frac{1}{L\_{loc}}\bigg((a^2 - 1)\frac{\partial^2}{\partial a^2} - a\frac{\partial}{\partial a} +1 \bigg)P(L,a)

I approximate via \frac{\partial P}{\partial L} \approx = \frac{P^{n+1} - P^n}{\Delta L} to obtain

P^{n+1} - \frac{\Delta L}{L\_{loc}}\bigg((a^2 - 1)\frac{\partial^2 P^{n+1}}{\partial a^2} - a\frac{\partial P^{n+1}}{\partial a} \bigg) - P^{n} = 0

then I have the bilinear form

a(P,v) = \int\_{\Omega}Pv(a) - \frac{\Delta L}{L\_{loc}}\bigg((a^2 - 1)\frac{\partial^2P}{\partial a^2} - a\frac{\partial P}{\partial a} + 1 \bigg)v(a)\,da,  
L\_{n+1}(v) = \int\_{\Omega}P^nv(a)\,da

My problem is trying to reduce the second derivatives, I am always left with extra terms which don’t allow me to get the weak form…

Any help on how to get around this much appreciated.

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [January 19, 2021, 7:21pm UTC](https://fenicsproject.discourse.group/t/problem-with-variational-form/4931/2 "2021-01-19T19:21:56Z")

</div>

To better understand your issue, what terms do you end up with when doing integrations by parts?  
Please write out your derviation, and set L\_{loc} to 1.  
Couldn’t his problem be written as  
\frac{\partial P}{\partial t}=(x^2-1) \frac{\partial^2P}{\partial x^2} -x\frac{\partial P}{\partial x} + P ?
