Mathematics
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.

answer
Answers: 2

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 18:00, arianaguerin
Janie has $3. she earns $1.20 for each chore she does and can do fractions of chores. she wants to earn enough money to buy a cd for $13.50. write an inequality to determine the number of chores, c, janie could do to have enough money to buy the cd.
Answers: 1
image
Mathematics, 21.06.2019 18:50, jen12abc82
The table represents a function f(x). what is f(3)? a.-9 b.-1 c.1 d.9
Answers: 1
image
Mathematics, 21.06.2019 21:30, amp1955
50 plz, given the system of equations, match the following items. x + 3 y = 5 x - 3 y = -1 a) x-determinant b) y-determinant c) system determinant match the following to the pictures below.
Answers: 2
image
Mathematics, 22.06.2019 02:00, Dweath50
Look at this system of equations. -3x + 3y = 12 y = x + 4 the solution set of this system is best explained by which of these statements? a) the graphs of the equations are the same line because the equations have the same slope and the same y-intercept. the system has infinitely many solutions. b) the graphs of the equations are parallel lines because they have the same slope but different y-intercepts. the system has no solution. c) the graphs of the equations are lines that intersect at one point because the equations have the same slope but different y-intercepts. the system has exactly one solution. d) the graphs of the equations are lines that intersect at one point because the equations have the same slope and the same y-intercept. the system has exactly one solution.
Answers: 2
Do you know the correct answer?
An acid is defined as a hydrogen ion (H+) donor, and is thus often represented symbolically as HA. T...

Questions in other subjects:

Konu
Mathematics, 18.11.2020 19:40
Konu
Mathematics, 18.11.2020 19:40
Konu
History, 18.11.2020 19:40
Konu
Chemistry, 18.11.2020 19:40
Konu
Mathematics, 18.11.2020 19:40