Cody

# Problem 419. Acidity of vinegar and salts

Assuming: pH (potentia hydrogenii) = - log10(H+ ionic concentration in mol/Liter). For a buffer solution containing acetic acid and sodium acetate, according to Henderson-Hasselbalch equation, the solution will have pH = 4.7 + log10(concentration of acetic acid / concentration of sodium acetate). If some sodium hydroxide (NaOH) is added that much (in mol for mol) acetic acid will be converted to sodium acetate. Your function should output final pH for a small input of NaOH in mol.

For example, when NaOH added is 0 mol to a solution containing 0.1 mol acetic acid and 0.1 mol sodium acetate then final pH is 4.7.

### Solution Stats

45.79% Correct | 54.21% Incorrect
Last Solution submitted on May 15, 2018
{"ft_lang_label":"__label__en","ft_lang_prob":0.79422694,"math_prob":0.86973804,"size":872,"snap":"2020-24-2020-29","text_gpt3_token_len":229,"char_repetition_ratio":0.13940091,"word_repetition_ratio":0.0,"special_character_ratio":0.24655963,"punctuation_ratio":0.09202454,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98100775,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-11T02:35:22Z\",\"WARC-Record-ID\":\"<urn:uuid:5dfbd21f-85b7-43e7-8bd4-5c4fe51c4720>\",\"Content-Length\":\"89518\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:81f1cd56-8187-4922-98ea-cd7c2ef3d2f6>\",\"WARC-Concurrent-To\":\"<urn:uuid:d44b1fb0-357b-4a67-89e1-127067bb9ee7>\",\"WARC-IP-Address\":\"23.66.56.59\",\"WARC-Target-URI\":\"https://se.mathworks.com/matlabcentral/cody/problems/419-acidity-of-vinegar-and-salts\",\"WARC-Payload-Digest\":\"sha1:B4CAYBMQABWDVTH3BUMHUOUVO3B6U4CE\",\"WARC-Block-Digest\":\"sha1:SQCMTBREHGRDLLNLWL2JAFL63QOMN2XS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593655919952.68_warc_CC-MAIN-20200711001811-20200711031811-00481.warc.gz\"}"}