MathCAD worksheet 3 – Trig and other functions
© dpl 2002,3,4,5,6,81PH15720/3
PH15720 MathCAD Example Sheet 3
The aim of this worksheet is to introduce you to mathematical functions in mathCAD and build on the work in the first two weeks.
By the end of the sheet you will know how to:
- Understand better how to work with equations
- Access MathCAD’s range of built-in functions
- Use simple trigonometry functions
- Define your own functions
This worksheet takes the form of a number of examples which illustrate and introduce these principles. Work through them all.
Some of the examples use angles in degrees, make sure you indicate this to mathCAD
Equations in physics and mathematics are usually given in a general form. Examples of these are:
/ and /When you apply these equations to your problems, you should change the names of the terms to reflect the problem. This is easiest achieved by appending text subscripts to the names of the terms. For example, when applying the above equations to simple problems, they may be re-written as follows:
/ and /This has two functions, firstly it makes it clearer what the terms of the equation refer to in your problem and secondly it avoids trying to use the names of built-in units as variables, which causes severe problems.
This weeks exercises take the form of a number of simple maths and physics problems. Create a MathCAD worksheet to illustrate solutions to these problems. This worksheet will form part of your assessed portfolio of work.
Your worksheet should include a short text description of the problems and comments explaining the variables you have chosen. Use a page break to separate the problems, so that each one starts at the top of a page. You will be awarded marks for the following points:
Layout style, choice of variable names, comments and correctness of results.
Keep the completed worksheet on your M: drive, you will be given guidelines on submission later.
Example 1 – Motion under constant acceleration
The equations of motion for bodies moving under constant acceleration are as follows:
Where the terms have the following meanings:
s / Distance travelledu / Initial Velocity
v / Final Velocity
a / Acceleration
t / Time Elapsed
These equations will need to be translated to make them specific to the following problem.
According to manufacturers data a Ford RS Cosworth should accelerate from 0 to 60mph in 6.2 sec. Using the formulae above calculate the following:
The final velocity in m/s (vRS60)
The average acceleration (aRS60) over this period in [m/s2]
The distance travelled (sRS60) whilst accelerating [in m]
The mass of the car, complete with driver and fuel is approximately 1300kg.
Calculate the kinetic energy of the car (keCar) at the end of the acceleration period [J]
Use the formula:
The brakes are applied and the car stops in 1.8 sec.
Calculate the average power dissipated in the brakes during braking [W]
Example 2 – Trigonometric Functions
The diagram below shows a plot of land.
Determine the angle of the corner , in degrees.
Determine the area of the property in m2, hectares and acres.
Calculate La and Lb in the diagram below:
Once you have reached here, please skip ahead to Section 5, User defined functions.
If you get time, you should come back and do the work in sections 3 & 4
Example 3 – Refraction
The formula relating the angles in incidence and refraction to the refractive indices of the materials involved is given below:
where n1 and n2 are the refractive indices of the two materials and 1 and 2 the angles made by the beams of light.
A laser is shone at the surface of a liquid with an angle of incidence of 45 deg. By moving a photodetector through the liquid, it is found that the refracted beam is at an angle of 32 deg. Calculate the index of refraction of the liquid.
You will need to rearrange the equation. For now, do this by hand. Later we will see how mathCAD can do this for you.
Example 4 – Components of Forces
This exercise concerns a 150kg mass suspended by wires from two hooks. The lengths if the wires has been adjusted so that the wires form an angle of 50 with the horizontal. Assume that the mass of the wires is negligible.
- Since the mass is equally supported by each hook, the vertical component of the force exerted by either hook (fv) will be equal to the force resulting from 75kg being acted upon by gravity. Derive an expression for fv
- Calculate the horizontal component of the force, fh
- Determine the resultant force, fR acting in each wire.
- What happens to fh if the wires are shortened so that the angle between the wires and the horizontal decreases ? Is this angle easy to change on your worksheet ?
Example 5 –User defined functions
Although MathCAD has many built-in functions, we frequently need to define our own function to perform some calculation.
Defining a user defined function is similar to defining a variable, except that we follow the name of our function with brackets containing one or more parameters for the function. Following the assignment operator is a mathematical expression which is evaluated when we use our function.
As an example we will create a function called hypotenuse which takes the lengths of the two short sides of a right angled triangle as parameters and returns the length of the hypotenuse.
To define the function first type the name of the function, in this case hypotenuse, followed by the list of formal parameters for the function enclosed in brackets.
After this type the assignment operator, :, followed by an expression involving the formal parameters.
The result should look like this:
Define the hypotenuse function as shown above and then use it in the following examples.
END
© dpl 2002,3,4,5,6,81PH15720/3