:orphan:
# TaoSetVariableBounds
Sets the upper and lower bounds for the optimization problem
## Synopsis
```
#include "petsctao.h"
PetscErrorCode TaoSetVariableBounds(Tao tao, Vec XL, Vec XU)
```
Logically Collective
## Input Parameters
- ***tao -*** the `Tao` context
- ***XL -*** vector of lower bounds
- ***XU -*** vector of upper bounds
## See Also
[](ch_tao), `Tao`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoGetVariableBounds()`
## Level
beginner
## Location
src/tao/interface/taosolver_bounds.c
## Examples
src/tao/bound/tutorials/jbearing2.c
src/tao/bound/tutorials/plate2.c
src/tao/complementarity/tutorials/minsurf1.c
src/tao/constrained/tutorials/ex1.c
src/tao/constrained/tutorials/tomographyADMM.c
src/tao/leastsquares/tutorials/tomography.c
src/tao/tutorials/ex3.c
src/tao/unconstrained/tutorials/eptorsion3.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/interface/taosolver_bounds.c)
[Index of all Tao routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)