Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Mobile App: Problem Statement Calculating the area under a curve is a standard problem in numerical methods. What you will develop is an app that

Mobile App: Problem Statement

Calculating the area under a curve is a standard problem in numerical methods. What you will develop is an app that calculates and displays the area under a range of curves.

Figure 1: Area under the curve of y = x2 over the range 1 to 2, with 1 trapezoid.

The area can be calculated by drawing one or more polygons (trapezoids) that approximate the curve. We start by drawing a trapezoid that encompasses our curve between the given limits and the x-axis, so for equation 1 of table 1, it looks like figure 1. We then calculate the area of the trapezoid. Notice that the trapezoid over-estimates the true area. With enough (smaller) trapezoids we can get a very good approximation to the area under the curve (see figure 2). The sum of the area of the smaller trapezoids is the area under the curve.

The area of a trapezoid is given by: A = (h1 + h2) d

Plot graphs of the equations in table 1 for varying (input) total numbers of trapezoids. Compute and display the area between each curve and the x-axis. The number of trapezoids should be a positive integer.

Extend your app by allowing the input of varying min and max x limits beyond those in Table 1, with max >= min

Table 1: Sample curves and associated areas.

Equation

xMin

xMax

Actual Area

y = x2

1

2

2 1/3

y = x2 4

-2

2

10 2/3

y = -x3 + 6x2 x +17

2

4

80.0000

y = 2x3+2x2-5x+3

-2.5

7

65.2502

Figure 2: Area under the curve of y = x2 over the range 1 to 2, with 2 trapezoids.

The more trapezoids, the better the approximation approaches the actual area. It is useful to know the error in the calculation.

The relative error can be computed by:

RE = | calculated area actual area |

actual area

%RE = | calculated area actual area | . 100%

actual area

Extend your app further by plotting %RE in area values (and the theoretical %RE line) for a range of trapezoids (1-100,000 in powers of 10 on the x-axis, 0.1-100 in powers of 10 on the y-axis) for each curve in Table 1.

I need a code for displaying a graph in corona simulator and it is on solar2D and Lua.

This are the things need in that code.

1. Extensive implementation. App uses scenes and composer. Event listeners function correctly. Evidence of separation of code and data. App optimised in terms of transitions/animations, memory and use of Lua. No memory leaks. App fully implements the problem statement.

2. User interface is intuitive and a user can use the app without guidance. Styling is consistent. The app provides the user with relevant feedback based on interactions. The app design is neat, clean, accurate, simple, and contains no misspellings or grammatical errors.

3. Comprehensive evidence of Black-box and Unit test

4. 8 or more data points (PSP time sheets) submitted on-time.

5.Detailed understanding demonstrated through consideration of outliers, discussion of linearity of curve and explanation of results. Predictive model supplied.

no need a explanation about that. mandatory I need a code for creating app. ( full code for that according to 6 steps)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions