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
Anna11 [10]
3 years ago
10

The Taylor series expansion for ax is: Write a MATLAB program that determines ax using the Taylor series expansion. The program

asks the user to type a value for x. Use a loop for adding the terms of the Taylor series. If cn is the nth term in the series, then the sum Sn of the n terms is . In each pass calculate the estimated error E given by . Stop adding terms when . The program displays the value of ax. Use the program to calculate: (a) 23.5 (b) 6.31.7 Compare the values with those obtained by using a calculator.
Computers and Technology
1 answer:
zalisa [80]3 years ago
7 0

Answer: (a). 11.3137

(b). 22.849

Explanation:

Provided below is a step by step analysis to solving this problem

(a)

clc;close all;clear all;

a=2;x=3.5;

E=10;n=0;k=1;sn1=0;

while E >0.000001

cn=((log(a))^n)*(x^n)/factorial(n);

sn=sn1+cn;

E=abs((sn-sn1)/sn1);

sn1=sn;

n=n+1;

k=k+1;

end

fprintf('2^3.5 from tailor series=%6.4f after adding n=%d terms\n',sn,n);

2^3.5 from tailor series=11.3137 after adding n=15 terms

disp('2^3.5 using calculator =11.3137085');

Command window:

2^3.5 from tailor series=11.3137 after adding n=15 terms

2^3.5 using calculator =11.3137085

(b)

clc;close all;clear all;

a=6.3;x=1.7;

E=10;n=0;k=1;sn1=0;

while E >0.000001

cn=((log(a))^n)*(x^n)/factorial(n);

sn=sn1+cn;

E=abs((sn-sn1)/sn1);

sn1=sn;

n=n+1;

k=k+1;

end

fprintf('6.3^1.7 from tailor series=%6.4f after adding n=%d terms\n',sn,n);

disp('6.3^1.7 using calculator =22.84961748');

Command window:

6.3^1.7 from tailor series=22.8496 after adding n=16 terms

6.3^1.7 using calculator =22.84961748

cheers i hope this helped !!!

You might be interested in
A media strategy that involves high ________ most likely involve creating broad exposure using many media vehicles, while a stra
Tom [10]

Answer: Reach and frequency

Explanation:

 The media strategy is the planning and action that basically involve high reach in the exposure by using the media vehicle. It basically improve the overall conversation rate of customers.

The conversation rate is refers to the total percentage of the users which involve using the website and various applications.

This strategy also involve with high frequency that limited the list of the media vehicle.

 

5 0
3 years ago
Becca is working on a program that will store data. The program will need quick access to data and data persistence is not impor
borishaifa [10]

Based on the information given the data should be stored in flash memory.

<h3>What is flash memory:</h3>

Flash memory is a memory storage space that is used to store data or information on a computer.

Flash memory is vital as it help to retain information or data that are stored on a computer after power is removed which inturn means that store data can be retrieve when needed.

Example of flash memory are:

  • CompactFlash  
  • Memory Stick
  • BIOS chip etc

Inconclusion the data should be stored in flash memory.

Learn more about flash memory here:brainly.com/question/6835146

7 0
2 years ago
Write a loop that fills an array int values[10] with ten random numbers between 1 and 100. Write code for two nested loops that
zalisa [80]

Answer:

#include <iostream>

#include <cstdlib>

using namespace std;

int main() {

   int[] array = new int[10];

   int index = 0;

   while(index < array.size()){

           int number = (rand() % 100) + 1;

           for (int i = 0; i < 1; i++) {

               array[index] = number;

               cout<< "Position "<< index << "of the array = "<< number << endl;

               ++index;

           }

     }

}

Explanation:

The while loop in the source code loops over a set of code ten times, The for loop only loops once to add the generated random number between 1 and 100 to the array of size 10. At the end of the for loop, the index location and the item of the array is printed out on the screen. The random number is generated from the 'rand()' function of the C++ standard library.

7 0
3 years ago
What is the name of the file in which this
anyanavicka [17]

Answer:

B

Explanation:

i’m an information technology  student and as I remember we used this  name

3 0
3 years ago
The programming language that translates digital data into printer commands is known as
jolli1 [7]
The answer is C.) PostScript
8 0
3 years ago
Other questions:
  • A software program that allows a programmer to type in code. modern versions usually make it easy to format the code on the scre
    13·1 answer
  • When did Kodak introduce film photography to the commercial market?
    10·2 answers
  • vulnerability is a feebleness which allows an attacker to condense a system's information assurance to security,is it true or fa
    14·1 answer
  • Which is an advantage of programming with a procedural language?
    12·2 answers
  • If you were setting up a network with 100 nodes and you wanted no more than 25 nodes per segment: what devices and connections w
    9·1 answer
  • What steps should a user take to create a secondary address book?
    8·2 answers
  • In working on the conceptual design of the new database, Ken determines that the "office" field in one of the tables must includ
    8·1 answer
  • Hey! PLEASE HELP!!!
    12·1 answer
  • Es la actividad que posibilita comunicar gráficamente ideas, hechos y valores procesados y sintetizados en términos de forma y c
    11·1 answer
  • Each student has a record on a file consisting of the following data: Student last name, Student ID (numeric), GPA (a decimal nu
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!