Would the proceeds one obtains from writing a book that took 10 years to write be considered gainful employment in regards to TDIU? Does this type of income fall into the same criteria as farming etc?
Probably not...but there are things to be considered. No matter how long it took you to bring the book to publishing and sales, it's very likely that any income from sales would be taxed in the year you earned it. You'll have to consult with a CPA or attorney knowledgeable of such income streams to be sure.
That would mean that if you published in 2018, you'd be reporting any taxable income to the IRS in 2019 and the IRS would tax it as earned income for the fiscal year 2018. Since VA cross matches taxed incomes with the IRS, it's best to keep all this on the straight and narrow.
There are certain instances when we can spread income back or forward in time for tax purposes but again, you really need the advice of a professional. VA may or may not buy into such a scheme even if IRS would.
If your taxable income exceeded the allowable limit, the VA would take notice and yes, that could affect your TDIU benefits. For specifics about the various types of income and the TDIU benefit, I've uploaded the chapter of the M21-1MR that is specific to the topic...there's a lot of data there. You may want to check on line for updates to this
M21 document in the future.
Keeping an eye on the VA, because somebody has to.
Legal Help For Military and Veterans