# Boundary-value problems using sympy

I'm trying to solve a boundary-value problem using sympy. I was able to solve the ODE but the dsolve function doesn't return the values of the constants $C_1$ and $C_2$.

Boundary-value problem:

$u''_{xx}+u+1=0$ with a boundary condition $u(0)=0, \quad u'_x(1)=1$

Python Code:

I tried the next code in jupyter notebook and sympy live

from sympy import *
init_printing(use_latex='mathjax')
u = Function('u')
x = Symbol('x')
dsolve(Derivative(u(x),x,x)+u(x)+1,u(x),ics={u(0): 0, u(x).diff(x).subs(x, 1): 1})


$$u(x)=C_1\sin(x)+C_2\cos(x)−1$$
$$u(x)=-1+\cos(x)+\sec(1)\sin(x)+\sin (x) \tan (1)$$