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

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 19:30, abbybarrera6187
Is the figure congruent? yes or no?
Answers: 1
image
Mathematics, 21.06.2019 21:30, paolacorazza
Miss henderson wants to build a fence around a rectangular garden in her backyard in the scale drawing the perimeter of the garden is 14 in of the actual length of a b is 20 ft how many feet of fencing what you need
Answers: 3
image
Mathematics, 21.06.2019 22:40, chuchi24
Alina fully simplifies this polynomial and then writes it in standard form. xy2 – 2x2y + 3y3 – 6x2y + 4xy2 if alina wrote the last term as 3y3, which must be the first term of her polynomial in standard form? xy2 5xy2 –8x2y –2x2y
Answers: 1
image
Mathematics, 22.06.2019 02:00, AnastasiaJauregui
If p(x) is the total value of the production when there are x workers in a plant, then the average productivity of the workforce at the plant is a(x) = p(x) x . (a) find a'(x). a'(x) = xp'(x) − p(x) x a'(x) = xp'(x) − p(x) x2 a'(x) = p'(x) − p(x) x a'(x) = xp'(x) − p'(x) x2 a'(x) = p'(x) − xp(x) x2 why does the company want to hire more workers if a'(x) > 0? a'(x) > 0 ⇒ a(x) is ; that is, the average productivity as the size of the workforce increases. (b) if p'(x) is greater than the average productivity, which of the following must be true? p'(x) − xp(x) > 0 p'(x) − xp(x) < 0 xp'(x) − p'(x) > 0 xp'(x) − p(x) < 0 xp'(x) − p(x) > 0
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 in other subjects: