Thanks Don for the NEC reference. Suppose i needed a larger breaker because the output from the inverter is greater than 40amps. What's the best/allowable method of tying it into the
200amp main breaker panel?
What is your inverter? The breaker size is the maximum continuous rated output current of the inverter X 1.25, and then up to the next standard breaker size. If that comes out to be more than 40A, then you'll have to come up with a Plan B.
If it's 40A or less, you will want to install a backfeedable breaker (one that does not have "line" or "load" labeling at the terminals) into the service panel at the opposite end of the busbars from the main breaker. Depending on the rules of your AHJ (authority having jurisdiction),you may need to hire a licensed electrician to install it.
If it's more than 40A, you'll have to do some finagling. One thing you can do is use a smaller backfed breaker, which might result in nuisance trips of the breaker when PV output is high. You can upgrade your service (you'll definitely need an electrician for that) to one which gives you enough headroom in the 120% rule to do the install. That will be expensive. You can install a smaller main breaker in your service panel to generate more headroom (ditto on the electrician), but that will risk starving your loads and possible nuisance trips of the main when you have a lot of appliances running. However you do it, you must always be certain the the rating on the breaker is lower than the derated ampacity of the conductors which feed it.
Finally, you can install the PV with a line side tap between your service and the meter, but that is also expensive and will definitely require the services of a licensed electrician.