0% found this document useful (0 votes)
64 views21 pages

Lab Manual Ws 3 4

Uploaded by

nandhikaaraj747
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views21 pages

Lab Manual Ws 3 4

Uploaded by

nandhikaaraj747
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

WORKSHEET-3

EVALUATING LIMITS AND DERIVATIVES

3.1 OBJECTIVES:
 To determine the limits and one-sided limits of a function,
understanding how systems behave at specific points.
 To calculate the rate of change of a system using differentiation,
providing insights into system dynamics.
 To apply these concepts to real-world problems in Aerospace,
Automobile, Civil, Mechanical, and Mechatronics Engineering, in
line with SDG 9 (Industry, Innovation, and Infrastructure) and SDG 13
(Climate Action).

3.2 PROCEDURE:

Follow these steps to execute the MATLAB code for any given task:
 Open MATLAB.
 Create a new script file (M-file).
 Input the program code.
 Save the file in the working directory.
 Execute the program.
 Observe the results in the Command Window or Figure Window.

Code:

% Define the symbolic variable


syms x
% Define your function here (replace 'your_function_here' with your
expression)
f = 'your_function_here';
% Replace 'point_to_evaluate' with the value where you want to compute the
limit and derivatives
point = 'point_to_evaluate';

% Compute the limit of the function as x approaches the point

1
limit_value = limit(f, x, point);

% Compute the first derivative of the function and evaluate it at the point
first_derivative = diff(f, x);
first_derivative_at_point = subs(first_derivative, x, point);

% Compute the second derivative of the function and evaluate it at the


point
second_derivative = diff(first_derivative, x);
second_derivative_at_point = subs(second_derivative, x, point);

Scenario: Solar-Powered Drone Monitoring Efficiency

A solar-powered drone is used to monitor climate change by flying over large


areas and collecting data on deforestation, rising sea levels, and glacier melting.
This drone uses rechargeable solar batteries to sustain long-term missions. The
battery's efficiency decreases initially but stabilizes over time as solar energy
recharges the battery during flight.
The efficiency of the drone’s battery is modeled by the function:𝑓(𝑡) =
3𝑡 2 −2𝑡+4
, where: 𝑡 represents time in hours, and 𝑓(𝑡) represents the battery
𝑡 2 +𝑡+1

efficiency.

Task 1(Limits and One-Sided Limits):

1. Find the initial battery efficiency at 𝑡 = 0 (when the drone starts flying).
2. Determine the long-term efficiency of the battery as 𝑡 → ∞ (when the drone
has been flying for a
long time).
3. Evaluate the one-sided limits as 𝑡 → 0+ (from the right) and 𝑡 → 0− (from
the left) to analyze how the efficiency behaves when approaching 𝑡 = 0 from
both directions.

2
Code:
syms t
𝑓 = (3 ∗ 𝑡 2 − 2 ∗ 𝑡 + 4)/(𝑡 2 + 𝑡 + 1);
% Limit as t approaches infinity
limit_infinity = limit(f, t, inf);

% Limit as t approaches 0
limit_zero = limit(f, t, 0);

% One-sided limits as t approaches 0 from the right and left


limit_zero_right = limit(f, t, 0, 'right');
limit_zero_left = limit(f, t, 0, 'left');

disp('Limit as t approaches infinity:')


disp(limit_infinity)
disp('Limit as t approaches 0:')
disp(limit_zero)
disp('One-sided limit as t approaches 0 from the right:')
disp(limit_zero_right)
disp('One-sided limit as t approaches 0 from the left:')
disp(limit_zero_left)

Output :
 At 𝑡 = 0 ∶ The limit is 4.
 As 𝑡 → ∞: The limit is 3.
 One-sided limit as 𝑡 → 0+ (from the right): The limit is 4.
 One-sided limit as 𝑡 → 0− (from the left): The limit is 4.

3
Inference (Limits and One-Sided Limits):
 At 𝑡 = 0: The initial efficiency is 4 units, indicating the system is
operating at its peak performance when it starts. In real-world
applications, this could represent a system at full charge or optimal
conditions.
 As 𝑡 → ∞: The efficiency stabilizes at 3 units, showing that the system
reaches a steady state over time. This behavior is crucial for designing
systems that can maintain performance over long periods.
 One-sided limits:
From the right 𝑡 → 0+ and left 𝑡 → 0− : Both one-sided limits approach 4,
meaning the function behaves consistently as it approaches 𝑡 = 0 from
either direction. This ensures that there are no sudden jumps or drops in
performance when the system starts, which is important for avoiding
disruptions in real-world scenarios.

Importance of One-Sided Limits

 One-sided limits are used to understand the behavior of a function when


it is approached from either the left or the right of a certain point.
 This is especially useful in cases where a system may behave differently
depending on the direction from which it is approached.
 In practical terms, one-sided limits help detect potential discontinuities
or sudden changes, ensuring that the system's performance is smooth and
consistent.
 For instance, in engineering systems, a function might exhibit a jump in
behavior at a certain point, which one-sided limits help reveal.
 They are also used to verify the continuity of functions, which is crucial
for smooth operation in various applications.

4
Task 2 (Differentiation):
1. Calculate the rate of change of efficiency at 𝑡 = 0, when the drone begins its
monitoring flight.
2. Find the rate of change of efficiency at 𝑡 = 24 hours, reflecting a full day of
operation to assess how
the battery stabilizes over a typical day.
Code (Differentiation):

syms t
𝑓 = (3 ∗ 𝑡 2 − 2 ∗ 𝑡 + 4)/(𝑡 2 + 𝑡 + 1);
% Differentiate the function to find the rate of change of efficiency
f_prime = diff(f, t);
% Rate of change at t = 0
rate_at_zero = subs(f_prime, t, 0);
% Rate of change at t = 24 hours
rate_at_24_hours = subs(f_prime, t, 24);

Output (Differentiation):
Rate of change at𝑡 = 0: The rate is 2 units per hour.
Rate of change at𝑡 = 24 ℎ𝑜𝑢𝑟𝑠: The rate is approximately 1.03 units per hour.
Inference:
 At 𝑡 = 0: The efficiency is decreasing at 2 units per hour. Initially, the
drone uses a lot of power, causing a rapid drop in battery efficiency.
However, as the solar panels recharge the battery, the decrease slows
down.
 At 𝑡 = 24 hours, the rate of change of efficiency is 1.03 units per hour.
This means that after a full day, the battery efficiency stabilizes. The solar

5
panels are helping recharge the battery, slowing the loss of efficiency,
which allows the drone to keep flying efficiently for longer.

HANDS-ON TASK
1.Scenario: Jet Engine Fuel Consumption

Jet engines consume fuel at varying rates depending on altitude and speed
during a flight. Understanding long-term fuel consumption is critical for
optimizing flight efficiency. The fuel consumption is modeled by 𝑓(𝑥) =
4𝑥 2 +5𝑥+6
, where 𝑥 represents time (in hours), 𝑓(𝑥) represents fuel consumption
𝑥 2 +2𝑥+1

(in liters per hour).


Evaluate the limit as 𝑥 → ∞ to determine the long-term fuel consumption
behavior of the jet engine.

2.Scenario: Load-Bearing Bridge Design

In bridge design, it's important to understand how structures behave under near-
critical loads to prevent failure. The structural response of a bridge under load is

6
𝑥 3 −2𝑥+1
modeled by 𝑓(𝑥) = , where 𝑥 represents load (in tons), 𝑓(𝑥) represents
𝑥−1

the structural response.


Evaluate the limit as 𝑥 → 1, and check the one-sided limits to understand how
the bridge behaves near critical load conditions.

3.Scenario: Mechanical Vibrations in a Spring

Mechanical systems often experience vibrations. Understanding how these


vibrations decay over time is crucial for ensuring stability. The displacement of
1
a spring over time is modeled as 𝑓(𝑥) = 𝑥 3 sin ( ), where 𝑥 represents time (in
𝑥

seconds), 𝑓(𝑥) represents displacement (in meters).


Evaluate the limit as 𝑥 → 0 , and check the one-sided limits to understand the
behavior of the spring as it approaches equilibrium.
7
4.Scenario: Car Acceleration Optimization

Optimizing a car's acceleration and deceleration is essential for improving fuel


efficiency and ensuring safety. The position of a car over time is modeled by
𝑠(𝑡) = 2𝑡 3 + 3𝑡 2 + 4𝑡, where 𝑡 is time (in seconds), 𝑠(𝑡) represents position
(in meters).
i) Find the velocity and acceleration of the car at any given time 𝑡 .
ii) Calculate the velocity and acceleration at 𝑡 = 2 seconds.

8
5. Scenario: Signal Response in Automation Systems

In mechatronics, it's important to control and optimize signal response for


precise operations in automation systems.
The signal responseis modeled by 𝑓(𝑥) = 5𝑥 2 − 2𝑥 + 3, where: 𝑥 represents
time (in seconds), 𝑓(𝑥) represents signal strength (in volts).
Find the derivative of the signal function and calculate the value at 𝑥 = 1
second.

6.Scenario: Heat Distribution in Aerospace Materials

In aerospace applications, materials are subjected to extreme temperature


variations. It's important to understand how quickly temperatures change along
surfaces. The temperature along the surface of an aircraft is modeled as 𝑓(𝑥) =
𝑒 𝑥 sin(𝑥), where 𝑥 represents the position (in meters),𝑓(𝑥) represents the
temperature (in °C).

9
Find the derivative of the temperature function to understand the rate of change
of temperature along the aircraft surface.

7. Scenario: Stress Distribution in Mechanical Components

Understanding how stress distributes in mechanical components is crucial for


ensuring durability and preventing failure under load. The stress distribution in
a component is modeled by:
𝑓(𝑥) = ln(𝑥 2 + 2𝑥 + 2),where 𝑥 represents the position along the component
(in meters),
𝑓(𝑥) represents stress (in Pascals).
Find the second derivative of the stress function to analyze the rate of change of
stress along the mechanical component.

10
WORKSHEET- 4
DETERMINATION OF MAXIMA AND MINIMA OF A FUNCTION OF
ONE VARIABLE
4.1 OBJECTIVE
 Learn to find critical points of functions using differentiation.
 Apply maxima and minima concepts to solve optimization problems in
Aerospace, Automobile, Civil, Mechanical, and Mechatronics
engineering.
 Enhance system efficiency in line with SDG 9 (Industry, Innovation, and
Infrastructure) and SDG 13 (Climate Action).

4.2 PROCEDURE

Follow these steps to execute the MATLAB code for any given task:
 Open MATLAB.
 Create a new script file (M-file).
 Input the program code.
 Save the file in the working directory.
 Execute the program.
 Observe the results in the Command Window or Figure Window.

Code:

% Define the symbolic variable


syms x
% Define your function (replace this with your actual function)
f = 'your_function_here'; % Example: f = x^3 - 12*x^2 - 20
% Compute the first derivative
fx = diff(f, x);
% Find the critical points by solving fx = 0
a = solve(fx, x);
% Convert symbolic solution to numeric form

11
critical_points = double(a);
% Display critical points
critical_points
% Compute the second derivative
fxx = diff(fx, x);
% Check for first critical point (replace 8 with the first critical point value)
D = subs(fxx, x, 8);
if D > 0
% If second derivative is positive, it attains a minima
disp('Attains Minima')
elseifD < 0
% If second derivative is negative, it attains a maxima
disp('Attains Maxima')
else
% If second derivative is zero, the test is inconclusive
disp('Second derivative test is inconclusive')
end
% Find the value of the function at this critical point
min_max_value = subs(f, x, 8);

% Display the min/max value of the function at this point


round(min_max_value)

% Check for second critical point (replace 0 with the second critical point
value)
D = subs(fxx, x, 0);
if D > 0
% If second derivative is positive, it attains a minima
disp('Attains Minima')
12
elseifD < 0
% If second derivative is negative, it attains a maxima
disp('Attains Maxima')
else
% If second derivative is zero, the test is inconclusive
disp('Second derivative test is inconclusive')
end
% Find the value of the function at this critical point
min_max_value = subs(f, x, 0);

% Display the min/max value of the function at this point


round(min_max_value)

Scenario: Optimizing Fuel Efficiency for an Autonomous Vehicle

Autonomous electric vehicles are designed to minimize energy consumption


while maximizing travel distance. However, efficiency tends to increase with
speed up to a point, after which wind resistance and mechanical limitations
reduce efficiency. The relationship between the vehicle's speed and its fuel
efficiency can be modeled by a cubic equation.
The fuel efficiency 𝐸(𝑣), in kilometers per kilowatt-hour (km/kWh), as a
function of speed 𝑣 (in kilometers per hour) is now modeled by the equation,
𝐸(𝑣) = −𝑣 3 + 15𝑣 2 − 60𝑣 + 100, where 𝐸(𝑣) is the fuel efficiency in
kilometers per kilowatt-hour (km/kWh), 𝑣 is the vehicle’s speed in kilometers
per hour (km/h).
Note:
 The cubic term −𝑣 3 reflects the decreasing efficiency due to wind
resistance and energy losses at high speeds.
 The 𝑣 2 term models the initial rise in efficiency as the speed increases,
reflecting improved momentum and aerodynamics at moderate speeds.
13
 The remaining terms balance the curve to reflect typical vehicle
performance.

Task:1

Find the optimal speed that maximizes fuel efficiency for the vehicle, reducing
energy consumption and environmental impact.

Code:
f = -v^3 + 15*v^2 - 60*v + 100;
dE = diff(f, v);
critical_points = solve(dE == 0, v);
critical_points = double(critical_points);
d2E = diff(dE, v);
D = subs(d2E, v, 10);
if D > 0
disp('Attains Minima');
elseif D < 0
disp('Attains Maxima');
else
disp('Second derivative test is inconclusive');
end
D = subs(d2E, v, 20);
if D > 0
disp('Attains Minima');
elseif D < 0
disp('Attains Maxima');
else
disp('Second derivative test is inconclusive');
14
end
Maximum value = subs(f, v, 20);
Maximum value

Output:
f = -v^3 + 15*v^2 - 60*v + 100
dE = -3*v^2 + 30*v - 60
critical_points = 10,20
d2E = -6*v + 30
D = 0 (at v = 10)
Second derivative test is inconclusive.
D = -30 (at v = 20)
Attains Maxima
Maximum value = 180
Max Fuel Efficiency at v = 20 km/h: 180 km/kWh
Inference:
The analysis shows that the vehicle reaches maximum fuel efficiency at a
speed of 20 km/h, where the efficiency is 180 km/kWh. At 10 km/h, the
second derivative test is inconclusive, meaning we cannot determine if it's a
maximum or minimum.
By operating at 20 km/h, the vehicle uses energy most efficiently, allowing it to
travel the longest distance per unit of energy, which supports the reduction of
energy consumption and emissions, aligning with sustainable transportation
goals.

HANDS-ON TASK

1.Scenario:Optimizing Drone Altitude for Maximum Airtime

In drone surveillance missions, maximizing airtime is critical to ensure longer


operations and fewer battery recharges. The airtime of a surveillance drone
15
depends on its flying altitude, as higher altitudes reduce air resistance but may
also impact battery efficiency. Engineers need to determine the best altitude to
keep the drone in the air for the longest possible time, balancing these factors.
The relationship between altitude and airtime is given by the function 𝑓(ℎ) =
−2ℎ2 + 100ℎ + 800, where ℎ is the altitude in meters. Find the altitude that
maximizes the drone’s airtime.

2.Scenario:Finding Optimal Speed to Maximize EV Range

Electric vehicles (EVs) are key to reducing emissions, but their efficiency
depends heavily on speed. Driving too fast drains the battery quickly, while
driving too slowly may not be optimal for covering distance. To enhance the
range of an electric vehicle, engineers are tasked with finding the optimal speed
at which the vehicle can travel the farthest on a single charge. The relationship
between speed and range is described by the function 𝑓(𝑠) = −3𝑠 2 + 150𝑠 −
16
600, where 𝑠 is the speed in kilometers per hour (km/h). Determine the speed
that maximizes the vehicle’s range.

3.Scenario:Calculating Maximum Load Capacity for Bridges

When constructing bridges, it is crucial to ensure they can handle maximum


loads without compromising safety. The ability of a bridge to support heavy
loads depends on how the load is distributed. Engineers must calculate the
optimal load to ensure the bridge can bear the maximum possible weight while
maintaining structural integrity. The relationship between load and capacity is
given by the function 𝑓(𝑙) = −𝑙 2 + 40𝑙 + 300, where 𝑙 is the load in tons.
Find the load that maximizes the structural capacity of the bridge.

17
4.Scenario:Minimizing Material Stress in Mechanical Joints

Mechanical joints in industrial equipment are subjected to significant stress due


to the loads they carry. Over time, excessive stress can lead to joint failure,
causing downtime and costly repairs. To prevent this, engineers need to find the
load that minimizes the stress on the joint, ensuring longer equipment life and
safer operations. The relationship between applied load and stress is represented
by the following function 𝑓(𝑥) = 𝑥 3 − 9𝑥 2 + 27𝑥 + 10, where 𝑥 is the load in
tons. Identify the load that minimizes the material stress in the mechanical joint.

18
5.Scenario:Optimizing Response Time of Robotic Arms

In modern manufacturing, robotic arms are used to increase productivity and

efficiency. However, the response time of a robotic arm -the time it takes to

complete a task- can be affected by multiple factors such as speed, load, and

19
control settings. To optimize performance, engineers need to determine the time

that minimizes the robotic arm's response time, allowing it to complete tasks

faster without compromising accuracy. The relationship between time and

response is represented by the function 𝑓(𝑡) = −𝑡 3 + 15𝑡 2 − 60𝑡 +

100,where 𝑡 is time in seconds. Determine the time that minimizes the robotic

arm's response time.

20
6. Find the minimum value of the function 𝑓(𝑥) = 7𝑥 3 − 2𝑥 2 − 5

21

You might also like