document.write( "Question 996934: Farmer John makes a pig pen out of bales of straw. For one pig he needs 8 bales of straw. When he adds a pig he needs two more bales to make the pen big enough. I need a formula to tell him how many bales of straw he will need for a given number of pigs. \n" ); document.write( "
Algebra.Com's Answer #615249 by Theo(13342)\"\" \"About 
You can put this solution on YOUR website!
you actually have a piecewise function.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "y = 0 when x = 0
\n" ); document.write( "y = 2x + 6 when x >= 1\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "if he has no pigs, he doesn't need any.
\n" ); document.write( "if he has 1 pig he needs 8
\n" ); document.write( "if he has 2 pigs he need 10
\n" ); document.write( "if he has 3 pigs he needs 12
\n" ); document.write( "etc.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );