[LEFT]مساعده ارجوكم الي يعرف لايبخل علينا ايبي في اقرب وقت ممكن

```
1- Alice buys three apples, a dozen bananas, and one cantaloupe for BD 2.300. Bob buys a dozen apples and two cantaloupes for BD 5.200. Carol buys two bananas and three cantaloupes for BD 2.700. How much do single pieces of each fruit cost?
[FONT="] [/font]2-From trigonometry, the tangent of both [FONT=Symbol]p[/font]/2 and -[FONT=Symbol]p[/font]/2 is infinity. Create a matlab code that will prompt the user to enter an angle between [FONT=Symbol]p[/font]/2 and -[FONT=Symbol]p[/font]/2. If the number is between [FONT=Symbol]p[/font]/2 and -[FONT=Symbol]p[/font]/2 but not equal then calculate tan([FONT=Symbol]q[/font]). If it is equal then set the result equal to Inf and display the result. If the number is outside the specific range, then send the user an error message.
```

3-You decide to start a saving account with BD2000 and contribute BD200 to the account every month. Suppose the interest on the account is 6% per year compounded monthly, which is equivalent to 0.5% each month. Each month your balance will increase in accordance with the formula

new balance = old balance +(monthly interest)*(old balance) + your contribution

Use a for loop to find the amount in the savings account each month for the next 18 years (create a vector of values). Plot the amount in the account as a function of time (plot time on the horizontal axis and dollar on the vertical axis, label each axis correspondingly)

4- The following vector shows the yearly percentage increases in college tuition for the next 22 years:

vector =[8 5 15 6 5 8 10 9 6 5 11 13 9 14 5 12 8 9 13 8 8 11]

Use a for loop to determine the cost every year assuming that the current cost is BD2000.

New tuition = old tuition *(1 + percentage)

5-In order to have a closed geometric figure composed of straight lines, the angles in the figure must add to

angle in degree = (n-2)*(180)

where n is the number of sides, so for a triangle (3 sides) the total of the angles is (3-2) * (180) = 180 degrees. Write a program that prompts the user to enter one of the following:

triangle

square

pentagon

hexagon

Use the input to define the value, n, using a switch/case structure. Then use n to calculate the sum of the angles.

6- Kinetic energy of an object is defined by

KE = (1/2) mV2

where m is the mass of the object in kg and V is its velocity in m/s.

a. Create a symbolic equation for kinetic energy and solve it for velocity.

b. Use the subs function to find the kinetic energy of a car that weighs 2000 kg and is traveling at 65 km/h (you have to match the units first).

6. 7-Determine the first and second derivatives of the following functions using MATLAB’s symbolic functions

a. y = x3 – 4x2 + 3x +8

b. y = cos(2x)sin(x)

c. y = (3x)e4x

d. y = (x2 -2x +1)(x-1)

8- Use MATLAB’s symbolic functions to perform integration on the following:

a. x3 +x

b. x3 +x, from x = 0.3 to x = 1.3

8. 9- A ball is dropped from above a building that is 50 meters high (the ground represent h =0). Kinetic energy and potential energy of the ball are defined by

KE = (1/2) mV2

PE = mgh

where the mass of the ball is m = 5 kg and the acceleration of gravity is g = 9.8m/s2. V is its velocity in m/s, and h is the height of the object in meters. The total energy of an object is conserved and is given by the sum of both energies

E = KE + PE

a. Create a vector h for the height from 0 to 50 meters with suitable increments.

b. Calculate PE as a function of height and save the results in a vector PE.

c. Plot the PE versus h.

d. Calculate a vector for the KE considering that

KE = the total energy E – the potential energy at height h, PE(h)

(the value of E is the total energy and is equal to PE at the top of the building, PE(h = 50).

d. Plot the KE versus h on the same plot in part c.

e. Find the speed of the ball as it falls using the equation:

KE = (1/2) mV2

(here you will use the vector KE to evaluate a new vector V)

f. Plot the speed of the ball V as a function of height h.

[/left]