SOLUTION: 1. A videoke machine can be rented for ₱1,000 for three days, but for the fourth day onwards, an additional cost of ₱400 per day is added. Represent the cost of renting a video

Algebra ->  Rational-functions -> SOLUTION: 1. A videoke machine can be rented for ₱1,000 for three days, but for the fourth day onwards, an additional cost of ₱400 per day is added. Represent the cost of renting a video      Log On


   



Question 1164938: 1. A videoke machine can be rented for ₱1,000 for three days, but for the fourth day onwards, an additional cost of ₱400 per day is added. Represent the cost of renting a videoke machine as a piecewise function of the number of days it is rented and plot its graph. Use https://www.desmos.com/calculator for graphing.
2. The fee for hiring a guide to explore a cave is ₱700. A guide can only take care of a maximum of 4 persons, and additional guides can be hired as needed. Represent the cost of hiring guides as a function of the number of tourists who wish to explore the cave and plot its graph. Use https://www.desmos.com/calculator for graphing.
3. The cost of hiring a catering service food for a party is ₱150 per head for 20 persons or less, ₱130 per head for 21 to 50 persons, and ₱110 per head for 51 to 100 persons. For 100 or more persons, the cost is at ₱100 per head. Represent the total cost as a piecewise function of the number of attendees of the party.

Answer by CPhill(2189) About Me  (Show Source):
You can put this solution on YOUR website!
```python
import matplotlib.pyplot as plt
import numpy as np
# Plot 1: Videoke Rental
# C(d) = 1000 for 0 < d <= 3
# C(d) = 1000 + 400(d-3) for d > 3
d1 = np.linspace(0, 3, 100)
c1_1 = np.full_like(d1, 1000)
d2 = np.linspace(3, 10, 100)
c1_2 = 1000 + 400 * (d2 - 3)
plt.figure(figsize=(10, 5))
plt.plot(d1, c1_1, label='0 < d <= 3', color='blue', linewidth=2)
plt.plot(d2, c1_2, label='d > 3', color='red', linewidth=2)
plt.title('Videoke Rental Cost')
plt.xlabel('Number of Days (d)')
plt.ylabel('Cost (₱)')
plt.grid(True)
plt.legend()
plt.savefig('videoke_rental_cost.png')
plt.close()
# Plot 2: Cave Guide Fee
# C(n) = 700 * ceil(n/4)
n = np.arange(1, 21)
c2 = 700 * np.ceil(n / 4)
plt.figure(figsize=(10, 5))
plt.step(n, c2, where='post', label='Cost per persons', color='green', linewidth=2)
plt.scatter(n, c2, color='green')
plt.title('Cave Guide Fee')
plt.xlabel('Number of Persons (n)')
plt.ylabel('Cost (₱)')
plt.grid(True)
plt.legend()
plt.savefig('guide_fee_cost.png')
plt.close()


```
Here are the piecewise functions and plots for the three scenarios described:
### 1. Videoke Machine Rental
The cost depends on the number of days . The first three days have a flat rate of ₱1,000. From the fourth day onwards, an additional ₱400 is added for each day beyond the third.
**Piecewise Function:**

*Simplified for : *
### 2. Cave Guide Fee
Each guide costs ₱700 and can handle a maximum of 4 persons. This creates a step function where the cost increases every time a new group of 4 (or fraction thereof) starts.
**Function:**


*(where is the ceiling function, representing the number of guides needed)*
**Piecewise Representation:**

### 3. Catering Service Food Cost
The total cost is the product of the number of attendees and the specific price per head for that bracket.
**Piecewise Function:**

---
### Visualizations
The graphs below represent the cost functions for the Videoke Rental and the Cave Guide Fee.
**Graph 1: Videoke Rental Cost**
The graph stays flat at ₱1,000 for the first 3 days and then increases linearly with a slope of 400.
**Graph 2: Cave Guide Fee**
The graph is a step function, jumping by ₱700 for every 4 additional people.
(The following images are generated based on these functions)
{ "images": [ "videoke_rental_cost.png", "guide_fee_cost.png" ] }