A school librarian bought 30 books for a total of $130. A storybook cost $4, while a science book and math book cost $6 and $5 respectively. How many books in each category did she buy?

[find 2 possible answers]

If there are x,y,z stories, science, and math, then

x+y+z = 30
4x+6y+5z = 130
There are many possible solutions. If you pick a value for x, then
y = x-20
z = 50-2x
So, clearly, 20<x<25
so, pick x=21, and that gives you y=1, z=8, for
21 stories, 1 science, 8 math

#lifesaver

Let's use algebra to solve this problem. Let's assume the librarian bought "x" storybooks, "y" science books, and "z" math books.

Based on the information given, we can create the following equations:

1) x + y + z = 30 (since the librarian bought a total of 30 books)
2) 4x + 6y + 5z = 130 (since the total cost of the books was $130)

To find the possible values of x, y, and z, we can solve this system of equations.

Using the first equation and solving for x:
x = 30 - y - z

Substituting this value of x into the second equation:
4(30 - y - z) + 6y + 5z = 130

Simplifying this equation:
120 - 4y - 4z + 6y + 5z = 130
-2y + z = 10
z = 10 + 2y .........(Equation 3)

Now, to find the possible values of x, y, and z, we can substitute the value of z from Equation 3 into Equation 1:

x + y + z = 30
x + y + 10 + 2y = 30
x + 3y = 20
x = 20 - 3y ...........(Equation 4)

Now, we have two equations (Equations 3 and 4) with two variables (x and y).

Let's find possible values for y and corresponding values for z and x:

For y = 1:
Using Equation 4: x = 17
Using Equation 3: z = 12

For y = 2:
Using Equation 4: x = 14
Using Equation 3: z = 14

For y = 3:
Using Equation 4: x = 11
Using Equation 3: z = 16

For y = 4:
Using Equation 4: x = 8
Using Equation 3: z = 18

For y = 5:
Using Equation 4: x = 5
Using Equation 3: z = 20

Therefore, the two possible combinations of books are:

1) storybooks = 17, science books = 1, math books = 12
2) storybooks = 14, science books = 2, math books = 14

To solve this problem, we can use a system of equations. Let's assume the number of storybooks is x, the number of science books is y, and the number of math books is z.

From the given information, we can derive the following equations:

1. The total number of books: x + y + z = 30
2. The total cost: 4x + 6y + 5z = 130

Now, we will solve this system of equations to find the two possible answers.

First Possible Solution:
Let's start by taking the first equation (x + y + z = 30) and isolate one of the variables. Let's say we isolate x:

x = 30 - y - z

Now we substitute this value of x into the second equation (4x + 6y + 5z = 130):

4(30 - y - z) + 6y + 5z = 130
120 - 4y - 4z + 6y + 5z = 130
2y + z = 10 --> Equation 1

To continue, we need to express one variable in terms of the other. Let's isolate z in terms of y from Equation 1:

z = 10 - 2y

Now we substitute this value of z into the first equation:

x + y + (10 - 2y) = 30
x - y = 20 --> Equation 2

Now we solve Equations 1 and 2 simultaneously:

From Equation 2, we have:
x = y + 20

Substituting this into Equation 1:
2y + z = 10
2y + (10 - 2y) = 10
2y - 2y + 10 = 10
10 = 10

Since we have both y and z canceled out, it implies that we can choose any values for y and z as long as they satisfy Equation 1. For example, let y = 5 and z = 0.

From Equation 2:
x = 5 + 20
x = 25

First possible answer:
x = 25 (storybooks), y = 5 (science books), z = 0 (math books)

Second Possible Solution:
Let's take the original equations and arrange them differently:

x + y + z = 30
4x + 6y + 5z = 130

From Equation 1, let's isolate z:

z = 30 - x - y

Now we substitute this value of z into the second equation:

4x + 6y + 5(30 - x - y) = 130

4x + 6y + 150 - 5x - 5y = 130
- x + y + 150 = 130
x - y = 20 --> Equation 3

Now we solve Equation 3 simultaneously with Equation 1:

From Equation 3, we have:
x = y + 20

Substituting this into Equation 1:
y + 20 - y = 20
20 = 20

Once again, we see that both variables y and x canceled out, indicating that we can choose any values for y and x as long as they satisfy Equation 3. For example, let y = 10 and x = 30.

From Equation 3:
x = 10 + 20
x = 30

Second possible answer:
x = 30 (storybooks), y = 10 (math books), z = 0 (science books)

Therefore, there are two possible answers:
1. 25 storybooks, 5 science books, and 0 math books.
2. 30 storybooks, 0 science books, and 10 math books.