In a library, 40% of the books were fiction and the rest were non-fiction. When 875 books were borrowed, the number of fiction books became half of the original number and the number of non-fiction books were decreased by 25%.

a) How many non-fiction books were borrowed?
b) How many fiction books were there at first?

a) Let's first find out how many fiction books there were at first. If 40% of the books were fiction, then 60% must have been non-fiction. We can set up a proportion:

40/100 = x/total books

Simplifying:

2/5 = x/total books

Multiplying both sides by the total number of books (which we don't know yet):

total books * 2/5 = x

Now we know that after 875 books were borrowed, the number of fiction books became half of the original number. So:

x/2 = original number of fiction books - 875

We also know that the number of non-fiction books decreased by 25%, so:

0.75(60/100 * total books) = original number of non-fiction books - a

where a is the number of non-fiction books borrowed.

Now we can set up an equation using the fact that a total of 875 books were borrowed:

x/2 + a = 875

Substituting the expressions we found earlier:

(original number of fiction books)/2 + original number of non-fiction books - a = 875

Simplifying:

(original number of fiction books)/2 + original number of non-fiction books = a + 875

We want to find a, so let's focus on the right side of the equation. We can use the equation we found earlier for the original number of non-fiction books:

0.75(60/100 * total books) = original number of non-fiction books - a

Simplifying:

45/100 * total books = original number of non-fiction books - a

Adding a to both sides:

original number of non-fiction books = 45/100 * total books + a

Substituting into our previous equation:

(original number of fiction books)/2 + 45/100 * total books + a = a + 875

Simplifying:

(original number of fiction books)/2 = 55/100 * total books - 875

Multiplying both sides by 2:

original number of fiction books = 110/100 * total books - 1750

Now we have an expression for the original number of fiction books in terms of the total number of books. We can substitute this into our equation for a:

45/100 * total books + a = (110/100 * total books - 1750)/2 + 875

Simplifying:

a = 0.35 * total books + 218.75

We've found an expression for a in terms of the total number of books, but we don't know the total number of books. However, we do know that 875 books were borrowed, so we can set up another equation:

total books - 875 = number of books in library now

We know that the number of non-fiction books in the library now is:

original number of non-fiction books - a = 0.4 * total books - 0.35 * total books - 218.75

Simplifying:

original number of non-fiction books - a = 0.05 * total books - 218.75

Multiplying both sides by -1:

a - original number of non-fiction books = -0.05 * total books + 218.75

Substituting for a:

0.35 * total books + 218.75 - original number of non-fiction books = -0.05 * total books + 218.75

Simplifying:

0.4 * total books - original number of non-fiction books = -0.05 * total books

0.45 * total books = original number of non-fiction books

Now we know that the original number of non-fiction books was 45% of the total number of books. We also know that 875 books were borrowed, so the number of non-fiction books borrowed is:

0.35 * total books + 218.75 = 0.35 * (total books - 875) + 218.75

= 0.35 * total books - 306.25

b) We already found an expression for the original number of fiction books:

original number of fiction books = 110/100 * total books - 1750

Substituting what we just found for the original number of non-fiction books:

original number of fiction books = 110/100 * total books - 1750 - 0.45 * total books

Simplifying:

original number of fiction books = 0.65 * total books - 1750

We still don't know the total number of books, so we can't find the exact number of fiction books. However, we do know that the original number of fiction books was 40% of the total number of books. So we can set up an equation:

0.4 * total books = 0.65 * total books - 1750

Solving for total books:

0.25 * total books = 1750

total books = 7000

Substituting into our expression for the original number of fiction books:

original number of fiction books = 0.65 * 7000 - 1750 = 3150

So there were 3150 fiction books at first.

The value of p % of something say S is given by equation

S' = p/100 * S ----1

Let us say there were x fiction and y non-fiction books respectively.

So total number of books were

S=x + y----------2

As per problem 40% were fiction books and 60 % were non fiction books
x = 40/100S - - - - - - - - 3
y = 60/100S - - - - - - - - 4

When 875 books were borrowed, they borrowed 50% of fiction books and 25% Non fiction books

Hence we can say that from equation 3 and 4

50% x = 50/100 40/100S = 20/100S
25% y = 25/100 60/100S = 15/100S

Mathematically we can say that

25% y + 50% x = 875

15/100S + 20/100S = 875

35S=875*100

S=25*100

Hence total number of books were

S=2500--------------------5

Number of non fictional books borrowed

N1 = 25% y = 15/100S
N1 = 15/100 * 2500
N1 = 375

Number of fictional books initially say

x = 40% S = 40/100S

x = 40/100 * 2500

x = 1000

Number of non fictional books borrowed

N1 = 375

Number of fictional books initially

x = 1000

Therefore, there were originally 1000 fiction books and 1500 non-fiction books in the library.

To solve this problem, let's break it down step-by-step:

Step 1: Find the total number of books in the library.
Let's assume the total number of books in the library is "T".

Step 2: Calculate the number of fiction books in the beginning.
40% of the books were fiction, so we can write this as 0.4T.

Step 3: Calculate the number of non-fiction books in the beginning.
The rest of the books were non-fiction, so the number of non-fiction books can be calculated as T - 0.4T = 0.6T.

Step 4: Calculate the number of fiction books after borrowing.
The number of fiction books became half of the original number (0.4T / 2), which simplifies to 0.2T.

Step 5: Calculate the number of non-fiction books after borrowing.
The number of non-fiction books was decreased by 25%, so it becomes 0.75*(0.6T).

Step 6: Calculate the total number of books borrowed.
The total number of books borrowed is given as 875.

Step 7: Calculate the number of non-fiction books borrowed (Part a).
To find the number of non-fiction books borrowed, we need to subtract the number of non-fiction books after borrowing (0.75*(0.6T)) from the total number of books borrowed (875).

Step 8: Calculate the number of fiction books in the beginning (Part b).
The number of fiction books in the beginning is given as 0.4T.

Let's now solve each part step-by-step:

Part a: Calculate the number of non-fiction books borrowed.
Number of non-fiction books borrowed = Total books borrowed - Number of non-fiction books after borrowing
Number of non-fiction books borrowed = 875 - (0.6T * 0.75)

Part b: Calculate the number of fiction books in the beginning.
Number of fiction books = 0.4T

Note: To solve this problem completely, we need to know the exact value of T.

To solve this problem, we'll need to break it down into steps.

Step 1: Find the original number of books.
Since 40% of the books were fiction, we can say that 60% were non-fiction. To find the original number of books, we can use the relation:

100% = original number of books
40% fiction + 60% non-fiction = 100%

Let x be the original number of books. In mathematical form, this gives us the equation:

0.4x + 0.6x = x

Simplifying the equation, we have:

1x = x

Therefore, the original number of books is x.

Step 2: Find the number of fiction books before borrowing.
Since 40% of the books were fiction, the number of fiction books can be found by multiplying the original number of books by 0.4 (40%). In mathematical form, this gives us:

Number of fiction books = 0.4x

Step 3: Find the number of non-fiction books before borrowing.
Since the rest of the books were non-fiction, the number of non-fiction books can be found by multiplying the original number of books by 0.6 (60%). In mathematical form, this gives us:

Number of non-fiction books = 0.6x

Step 4: Calculate the number of books borrowed.
We are told that 875 books were borrowed. Let b represent the number of books borrowed.

Therefore, the number of fiction books after borrowing is half the original number of fiction books:

Number of fiction books after borrowing = 0.5 × Number of fiction books = 0.5 × 0.4x = 0.2x

And the number of non-fiction books after borrowing is 75% (25% decrease) of the original number of non-fiction books:

Number of non-fiction books after borrowing = 0.75 × Number of non-fiction books = 0.75 × 0.6x = 0.45x
Now, we know that the total number of borrowed books is given by the equation:

b = Number of fiction books after borrowing + Number of non-fiction books after borrowing = 0.2x + 0.45x

Since we are given that b = 875, we can solve for x using the equation:

875 = 0.2x + 0.45x

Simplifying the equation, we have:

875 = 0.65x

Dividing both sides of the equation by 0.65, we get:

x = 875 / 0.65

Evaluating the expression, we find:

x ≈ 1346.15

Therefore, the original number of books (x) is approximately 1346.

a) How many non-fiction books were borrowed?
To find the number of non-fiction books borrowed, we substitute the value of x (approx. 1346) into the equation:

Number of non-fiction books after borrowing = 0.45x

Calculating this value, we get:

Number of non-fiction books after borrowing ≈ 0.45 × 1346 ≈ 605

Therefore, approximately 605 non-fiction books were borrowed.

b) How many fiction books were there at first?
To find the number of fiction books at first, we substitute the value of x (approx. 1346) into the equation:

Number of fiction books = 0.4x

Calculating this value, we get:

Number of fiction books ≈ 0.4 × 1346 ≈ 538

Therefore, there were approximately 538 fiction books at first.