Here are the equations you need to compute certain lines on the forms (the ones that say "if required" or "refer to page X" in the tax booklet). If you find one missing, let us know and we'll add an equation to this page.
Line 8a: Require Schedule B Part I only if interest are over $400
Line 9a: Require Schedule B Part II only if dividends are over $400
Note: The way tax forms usually work is that if your interest or dividends are less than $400, then you don't have to substantiate the details with a schedule; otherwise you need to attach Schedule B with the details. The relevant total from Schedule B is then entered onto the main form.
Lines 21, 32, 33: Just request a number
Line 40: if a box is checked on 39a, enter $5,000 on line 40; otherwise use Schedule A or the numbers in the box on the form (next to line 40) -- the user should choose which. In other words, ask the user whether she wants to fill in Schedule A (in which case the total from Schedule A goes into Line 40), or she wants to take the standard deduction (in which case you should automatically choose the correct standard deduction based on the filing status entered earlier).
Ignore the part about "if can be claimed as a dependent".
Line 44: Compute the tax on the amount in line 43. Use a tax rate of 33% for income over 150K, 28% for income over 75K to 150K, 17% for income over 30K to 75K, and no tax for incomes under 30K.
Line 28: There is no need to ask the user this question, since you already have the needed information in the electronic form. If the answer to the question is yes, just use 137,300 as the value, since we are not dealing with page A-7.
Line 29: This question is not redundant with the question you need to ask on Line 40 of the 1040 form (see above). If the user earlier decided to use Schedule A, but then discovers after filling it in that it is not to his advantage, this is a chance to throw away that information and just use the appropriate standard deduction.
For any other line that mentions a form or worksheet, ignore that part and just enter a number.
For blacked out lines, assume they are zero.