Elements that are undetectable by OE or X-ray are usually measured by specialized instruments for that purpose. Our chem lab has two sets of "determinators" manufacured by Leco. One measures carbon and sulfur, and the other measures oxygen and nitrogen. Both measure to 0.00000 accuracy, but variation in standards usually are +/- 0.002%
If you're just looking for a "quick and dirty" method of carbon
estimation, the spark test with a handheld grinder will ususally suffice. Following is taken from anvilfire.com:
"Spark Test
This is a common shop test that can be very handy. Note that it has some faults. In general the higher the carbon the more branches the sparks. Low carbon steel has long sparks with few branches and high carbon steel has positively fuzzy looking sparks. Alloys effect the spark and the best way to tell is with some comparison samples of known alloys.
Faults are primarily that different types of grinding wheels and speeds greatly affect the appearance of the spark. A hand held angle grinder makes a different spark than a bench grinder with fine wheel and that spark is different than one from a small high speed grinder like a Dremel tool. For this reason it is always a good idea to have some comparison samples of known steels. If you do all your testing on the same grinder in low light you can get pretty good at identifying varieties of steel. But using different grinders in different lighting conditions can often be fruitless.
Also be aware that a wheel that is loaded with a different steel may make sparks from the contaminate as much as the test sample. If possible dress the wheel with a diamond or carburundum dressing stick."
If you follow my link above, click on the "Metals for Engineering Craftsmen" link, then click on the spark diagram and you'll get to the full spark chart.
Hope this helps.