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 12:40
Points d and e are midpoints of the sides of triangle abc. the perimeter of the triangle is 48 units. what is the value of t? ο ο ο ο 7t +
Answers: 1
question
Mathematics, 21.06.2019 14:30
Acommunity group sells 2,000 tickets for its raffle. the grand prize is a car. neil and 9 of his friends buy 10 tickets each. when the winning ticket number is announced, it is found to belong to neil's group. given this information, what is the probability that the ticket belongs to neil? a.1/5 b.1/10 c.1/200 d.1/4
Answers: 2
question
Mathematics, 21.06.2019 16:00
Drag the tiles to the correct boxes to complete the pairs. not all tiles will be used. the heights of the girls in an advanced swimming course are 55, 60, 59, 52, 65, 66, 62, and 65 inches. match the measures of this data with their values.
Answers: 1
question
Mathematics, 21.06.2019 18:30
Water flows at a steady rate from a tap. its takes 40 seconds to fill a 4 litre watering can from the tap. the rate at which water flows from the tap is halved. complete: 4 litres into cm3
Answers: 3
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
Social Studies, 20.01.2021 16:50
question
English, 20.01.2021 16:50
question
Mathematics, 20.01.2021 16:50
Questions on the website: 13722367