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
Charging method .Constant current method​
mina [271]

Answer:

There are three common methods of charging a battery; constant voltage, constant current and a combination of constant voltage/constant current with or without a smart charging circuit.

Constant voltage allows the full current of the charger to flow into the battery until the power supply reaches its pre-set voltage.  The current will then taper down to a minimum value once that voltage level is reached.  The battery can be left connected to the charger until ready for use and will remain at that “float voltage”, trickle charging to compensate for normal battery self-discharge.

Constant current is a simple form of charging batteries, with the current level set at approximately 10% of the maximum battery rating.  Charge times are relatively long with the disadvantage that the battery may overheat if it is over-charged, leading to premature battery replacement.  This method is suitable for Ni-MH type of batteries.  The battery must be disconnected, or a timer function used once charged.

Constant voltage / constant current (CVCC) is a combination of the above two methods.  The charger limits the amount of current to a pre-set level until the battery reaches a pre-set voltage level.  The current then reduces as the battery becomes fully charged.  The lead acid battery uses the constant current constant voltage (CC/CV) charge method. A regulated current raises the terminal voltage until the upper charge voltage limit is reached, at which point the current drops due to saturation.

4 0
2 years ago
Select the correct answer.
boyakko [2]
I think the answer is b
6 0
3 years ago
Read 2 more answers
A digital filter is given by the following difference equationy[n] = x[n] − x[n − 2] −1/4y[n − 2].(a) Find the transfer function
slega [8]

Answer:

y(z) = x(z) - x(z) {z}^{ - 2}  -  \frac{1}{4} y(z) {z}^{ - 2}  \\ y(z) + \frac{1}{4} y(z) {z}^{ - 2} = x(z) - x(z) {z}^{ - 2} \\ y(z) (1 + \frac{1}{4}{z}^{ - 2}) = x(z)(1 - {z}^{ - 2}) \\  h(z) = \frac{y(z)}{x(z)}  =  \frac{(1 + \frac{1}{4}{z}^{ - 2})}{(1 - {z}^{ - 2})}

The rest is straightforward...

6 0
2 years ago
Which of the following describes one of an employee's responsibilities under OSHA's rules?
kow [346]

Explanation:

what are the options for this question?

5 0
2 years ago
Read 2 more answers
Which is not one of the primary characteristic of unit testing:
Neporo4naja [7]

Answer:

Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. This testing methodology is done during the development process by the software developers and sometimes QA staff. The main objective of unit testing is to isolate written code to test and determine if it works as intended.

Unit testing is an important step in the development process, because if done correctly, it can help detect early flaws in code which may be more difficult to find in later testing stages.

Unit testing is a component of test-driven development (TDD), a pragmatic methodology that takes a meticulous approach to building a product by means of continual testing and revision. This testing method is also the first level of software testing, which is performed before other testing methods such as integration testing. Unit tests are typically isolated to ensure a unit does not rely on any external code or functions. Testing can be done manually but is often automated. It might be helpful

6 0
1 year ago
Other questions:
  • Suppose an underground storage tank has been leaking for many years, contaminating a groundwater and causing a contaminant conce
    8·1 answer
  • If the 1550-lb boom AB, the 190-lb cage BCD, and the 169-lb man have centers of gravity located at points G1, G2 and G3, respect
    11·1 answer
  • A horizontal channel of height H has two fluids of different viscosities and densities flowing because of a pressure gradient dp
    5·1 answer
  • Why do we write proton ions first before electron ions? <br>​
    10·1 answer
  • Assume that a p+ - n diode is built with an n region width l smaller than a hole diffusion length (l
    14·1 answer
  • What is the key to being a good engineer?
    15·2 answers
  • The notation on one's license that the person must wear glasses
    9·1 answer
  • How do information systems support the activities in a supply chain?
    8·1 answer
  • In an RL parallel circuit, VT = 240 V, R = 330 Ω, and XL = 420 Ω. What is the Apparent Power (VA)?
    9·1 answer
  • Which of the following is a Dashboard Scoreboard for alignment of the business where information is constantly flowing through t
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!