1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
olya-2409 [2.1K]
3 years ago
10

3. Given the Taylor series expansion for sin x = x − x3/ 3! + x5/5! − x7/7! . Write a program that takes in an arbitrary integer

for an angle in degrees, converted the degrees to radians and performs the calculation above. Remember you will need a loop to calculate the ! term and float variables to hold the term(s) in the expansion and the converted degrees to radian.
Engineering
1 answer:
katen-ka-za [31]3 years ago
8 0

Answer:

clc

clear

x = input('type value of angle in degrees:\n');

x = x*pi/180; %convverting fron degree to radian

sin_x = x; %as first term of taylor series is x

E = 1; %just giving a value of error greater than desired error

n = 0;

while E > 0.000001

previous = sin_x;

n = n+1;

sin_x = sin_x + ((-1)^n)*(x^(2*n+1))/factorial(2*n+1);

E = abs(sin_x - previous); %calculating error

end

a = sprintf('sin(x) = %1.6f',sin_x);

disp(a)

Explanation:

You might be interested in
Vital role of maritime english among seaferers
seropon [69]

Answer:

uehgeg7djw7heidiisosowiuisiejei2k

8 0
3 years ago
A step-down transformer (turns ratio = 1:7) is used with an electric train to reduce the voltage from the wall receptacle to a v
SOVA2 [1]

Answer:

wait lemme check it out

Explanation:

6 0
3 years ago
Modify the one-dimensional continuity equation to include rainfall over the free surface
KonstantinChe [14]

The rainfall run off model  HEC-HMS is combined with river routing model. They are used for simulating the rainfall process.

Explanation:

The HEC - HMS rainfall model is used for simulating the rainfall runoff process. In this study the soil conservation service and curve number method is used to calculate the sub basin loss in basin module.

It provides various options for providing the rainfall distributions in the basin. It has the control specification module used to control the time interval for the simulations.

The one dimensional continuity equation is

бA / бT + бQ / бx= 0

3 0
3 years ago
Please write the following code in Python 3. Also please show all output(s) and share your code.
maksim [4K]

Answer:

sum2 = 0

counter = 0

lst = [65, 78, 21, 33]

while counter < len(lst):

   sum2 = sum2 + lst[counter]

   counter += 1

Explanation:

The counter variable is initialized to control the while loop and access the numbers in <em>lst</em>

While there are numbers in the <em>lst</em>,  loop through <em>lst</em>

Add the numbers in <em>lst</em> to the sum2

Increment <em>counter</em> by 1 after each iteration

6 0
3 years ago
Select the correct answer.
boyakko [2]
I think the answer is b
6 0
3 years ago
Read 2 more answers
Other questions:
  • 1. Copy the file Pay.java (see Code Listing 1.1) from the Student CD or as directed by your instructor. 2. Open the file in your
    10·1 answer
  • Bulk wind shear is calculated by finding the vector difference between the winds at two different heights. Using the supercell w
    12·1 answer
  • A Service Schedule is...
    8·2 answers
  • Some General Motors flex fuel vehicles do not use a fuel sensor to measure the percentage of ethanol in the fuel. These vehicles
    5·1 answer
  • Zack's new home is progressing well, and the foundation work is finished. The general contractor stops by Zack's present home to
    11·1 answer
  • 3. What is a caliber (relate it to rockets)
    14·1 answer
  • Which of the following parts tells the transmission how fast or slowly a vehicle is going? A) pump
    5·1 answer
  • When nondeterminism results from multiple threads attempting to access a shared resource such as a shared variable or a shared f
    9·1 answer
  • Reverse Engineering: Structural Analysis
    14·1 answer
  • What two factors are changing when the current is changed on an electric generator
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!