Cost-effective root barrier for home sewer line
The best way to prevent root problems is to replace old leaking cast or concrete pipe with plastic. Once glued there is no need to worry about plastic even when roots grow and buckle plastic (decades long process) plastic moves doesn’t usually break like concrete or cast that has many brittle joints that leak and draw the roots. If you have replaced a section and want to protect a fernco connector or “no hub” I have been told to pack the area with rock salt as the roots won’t like the high salt content, but the salt will dissolve and eventually leave a low point. 
Supply lines are better sealed than old drain lines and over the years as a tree gets large enough it may affect the lines so the only fool proof method is to not put your tree close.