A physical exam checks your total health. Examination focusing on your genitals (penis and testicles) is often done to check for ED. Based on your age and risk factors, the exam may also focus on your heart and blood system: heart, peripheral pulses and blood pressure. Based on your age and family history your doctor may do a rectal exam to check the prostate. These tests are not painful. Most patients do not need a lot of testing before starting treatment.
Factors that mediate contraction in the penis include noradrenaline, endothelin-1, neuropeptide Y, prostanoids, angiotensin II, and others not yet identified. Factors that mediate relaxation include acetylcholine, nitric oxide (NO), vasoactive intestinal polypeptide, pituitary adenylyl cyclase–activating peptide, calcitonin gene–related peptide, adrenomedullin, adenosine triphosphate, and adenosine prostanoids.
There are treatments available to help you to get and maintain an erection. In addition, making healthy changes to your lifestyle could help with impotence. Switching to a healthier balanced diet, taking more exercise and cutting down on or giving up alcohol and cigarettes could help you to see an improvement in sexual function. If you think that the problem may be related to stress or anxiety, counselling can also help.
The mechanisms by which testosterone plays a role in erectile function are not completely understood. A study evaluating the effect of testosterone on erections in surgically castrated rabbits and control animals, in which the rabbits’ intracavernosal pressures were compared after cavernosal nerve stimulation, determined that castrated rabbits had much lower pressures after stimulation than control rabbits did.  Notably, the pressures increased when castrated rabbits received exogenous testosterone replacement.