The objective of the present invention is to provide an analgesic effective in the prevention or treatment of various pain disorders. The present invention provides an analgesic containing, as the active ingredient, a trans-2-decenoic acid derivative represented by general formula (1) (in the formula: Y indicates -O-, -NR-, or -S-; R indicates a hydrogen atom, an alkyl group, a dialkylamino group, or the like; and W indicates a substituent group such as a dialkylaminoalkyl group) and/or pharmaceutically acceptable salt thereof. The analgesic having the compound as the active ingredient is highly useful as a therapeutic agent for various pain disorders, for example a prophylactic or therapeutic agent for pain resulting from osteoarthritis, such as knee osteoarthritis and hip osteoarthritis, and the like.