subject
Mathematics, 28.05.2021 21:50 thebestaround15

An acid is defined as a hydrogen ion (H+) donor, and is thus often represented symbolically as HA. The concentration of Hi in solution is usually expressed logarithmically by the pH scale, defined as: pH = -log10 (H+) (1) where the notation (H) represents concentration in moles of H' per liter of solution. Strong acids are substances in which virtually all of the molecules donate their Hiions in water, leaving virtually no unreacted molecules. For this reason, the concentration of the acid solution (HA) is equal to (H), which in turn can be used to calculate the pH of the solution. For weak acids, on the other hand, only a small fraction of molecules dissociate (i. e., donate H*); the precise extent to which they dissociate is quantified by a parameter known as the acid dissociation constant K. For a solution of a weak acid with concentration (HA), the H concentration is given by: (H+)? + K. (H) - K. (HA) = 0 Note that this has the form of a quadratic equation: ax+bx+c = 0, with x = [H] and a = 1, b = K CE-K*[HA] Therefore, if the acid concentration [HA] and the constant K, are both known for a particular solution, one can calculate (H) using the well-known quadratic formula (positive root only): -b+ √b² - 4ac 2a Once (H) (i. e., "x") is known, the pH can be calculated as pH = -log10 (x). 3. Weak Acid pH: Now, modify the section of the program for the weak acid. You will need to prompt the user for both (HA) and K, and use them to calculate and return the pH of the solution according to equations (3) and (1). ENGG 150 MATLAB Handout L11. Designing an Acid Calculator a) You will need to use a similar approach for dealing with user inputs of negative (HA) values; however, the weak acid case requires that you test for <1e-7 values of (H) after x is calculated in the quadratic formula. Write the pseudocode on the answer sheet. After programming the algorithm, test it using a typical value of K - 1.8 x 10 (represented in MATLAB as 1.8e-5) and with (HA) = 0.1, then 0, then-1. Ensure that the output is appropriate for all 3 cases. b) Next, try testing your function with K. = -1 and (HA) = 0.1. What happens? Again, in addition to a mathematical/logical error, it makes no physical sense to have negative K, values. Incorporate an elseif structure to control this user input error along with your previous (HA) error control, and test the program to ensure that it works properly.

ansver
Answers: 2

Another question on Mathematics

question
Mathematics, 21.06.2019 20:00
Afamily has five members. a mom, a dad, two sisters, & a brother. the family lines up single file. what is the probabillity that the mom is at the front of the line
Answers: 1
question
Mathematics, 21.06.2019 20:30
Janet is rolling a number cube with the numbers one through six she record the numbers after each row if she rolls of keep 48 times how many times should she expect to roll a 4
Answers: 1
question
Mathematics, 21.06.2019 21:30
Aroulette wheel has 38 slots in which the ball can land. two of the slots are green, 18 are red, and 18 are black. the ball is equally likely to land in any slot. the roulette wheel is going to be spun twice, and the outcomes of the two spins are independent.the probability that it lands one time on red and another time on black in any order is(a) 0.5 (b) 0.25 (c) 0.4488 (d) 0.2244
Answers: 1
question
Mathematics, 21.06.2019 23:00
Afamily went out to dinner and their bill was $113.if they want to leave a 19% tip, how much should they leave.
Answers: 2
You know the right answer?
An acid is defined as a hydrogen ion (H+) donor, and is thus often represented symbolically as HA. T...
Questions
question
English, 19.06.2021 04:30
question
Mathematics, 19.06.2021 04:30
question
Mathematics, 19.06.2021 04:30
question
English, 19.06.2021 04:30