I am afraid that the question is not clear due to bad formatting so I'll to explain a bit better

(sorry for double post)

I need a method for solving a linear system (x1..xn) of type

A*x=B

where A is a tridiagonal matrix

x x

. x x x

. . x x x

with (generic) structure

first row

x1*(k11+k12/(x1+x2+..xn) x2*k13

second row

x2*k21 x3*(k22+k23/(x1+x2+..xn) x4*k24

and so on, size N about 400 x 400 (sparse),

I am unable to find a solution which allow to use Thomas or similar efficient methods

cause diagonal elements contains K/(x1+x2+...+xn) which require separate processing,

what am I missing here ?

Is there any simple solution for these systems ?

Thanks for help.