In​ 2009, a diabetic express company charged ​$39.95 for a vial of type A insulin and ​$30.49 for a vial of type B insulin. If a total of ​$1446.64 was collected for 40 vials of​ insulin, how many vials of each type were​ sold?

number of A vials ---- x

number of B vials ---- 40-x

solve for x:

39.95x + 30.49(20-x) = 1446.64

To solve this problem, we need to set up a system of equations. Let's define the variables:

Let x be the number of vials of type A insulin.
Let y be the number of vials of type B insulin.

According to the information given, we have two equations:

Equation 1: The total cost of type A insulin (39.95) multiplied by the number of vials (x) plus the total cost of type B insulin (30.49) multiplied by the number of vials (y) equals the total amount collected (1446.64).
39.95x + 30.49y = 1446.64

Equation 2: The total number of vials sold (40) is the sum of the number of vials of type A insulin (x) plus the number of vials of type B insulin (y).
x + y = 40

Now we have a system of two equations. To solve them, we can use the substitution method or the elimination method. Let's use the elimination method:

First, multiply both sides of Equation 2 by 30.49 to get rid of the decimal:

30.49x + 30.49y = 1219.6

Now we can subtract Equation 1 from this new equation:

(30.49x + 30.49y) - (39.95x + 30.49y) = 1219.6 - 1446.64

Simplifying, we get:

30.49x + 30.49y - 39.95x - 30.49y = -227.04

Combine like terms:

-9.46x = -227.04

Divide both sides by -9.46 to solve for x:

x = -227.04 / -9.46
x ≈ 24

Now we can substitute this value back into Equation 2 to find y:

24 + y = 40
y = 40 - 24
y = 16

Therefore, there were approximately 24 vials of type A insulin sold and 16 vials of type B insulin sold.