my Beard is very thick and coarse,and it is uncomfortable.
can I shave if it causes discomfort and slight pain?
Keeping a beard is prescribed in Islam as it has been commanded by the Prophet ﷺ (Bukhari 5893), and hence shaving it is haram according to the majority view (Mawsoo‘ah al-Fiqhiyyah 35/225) , ( Fiqh al-Islami wa Adillatuhu 1/462). As such you should not shave your beard, even if you find it uncomfortable.
You could trim what is more than a fistful, as that is considered permissible by a group based on the practice of Ibn Umar (Bukhari 5892). And you can use products which will soften the hair, such as oils and conditioners etc. A hydrated and clean beard should be softer. Also with time you might get used to it.
No. You are not allowed to shave your beard based on below evidences.
An-Nisaa’ (5232) reported from al-Baraa’ that he (peace and blessings of Allaah be upon him) had a thick beard; according to another report, he had a bushy beard; according to another report, he had a wide beard.
Abu Hurayrah (رضي الله عنه) stated that Allah’s Messenger (صلى الله عليه وسلم) said: “Trim down the moustaches and grow the beards long and differ from the Magians (Fire Worshippers) Source: Muslim, 260
Ibn ‘Abbās (رضي الله عنهما) who narrated: “Allah’s Messenger (صلى الله عليه وسلم) cursed the men who resemble women and he cursed the women who resemble men.” Source: Bukhāri, 5885
There is a hadeeth collected by At-Tirmidhi (no. 2762) wherein it is said: “The Prophet would take from the width and length of his beard.” This hadeeth is fabricated (mawdoo’) as stated by the scholars of hadeeth, because there is a narrator in the chain called ‘Umar ibn Hāroon Al-Balkhi who was accused of lying. So, this hadeeth cannot be used as a proof for cutting the beard unrestrictedly from its length or its width. To act upon this fabricated narration opposes the authentic Sunnah. Furthermore, to act upon it knowingly just because it agrees with one’s desires is an added calamity that combines opposition to the Sunnah with following one’s inclination to imitate the unbelievers. Tirmidhi 2762; See Ad-Da’eefah of Al-Albāni, 288