S
S
sneeeg2020-12-08 16:01:03
Mathematics
sneeeg, 2020-12-08 16:01:03

How to perform function approximation in python?

I'm new to python

  • The following function is given on the interval x ∈ [-π, π]:
    V(x)=0.8(x²-π²)+1.3cos(7x/2)
    Approximate this function by a piecewise constant function 5fcf7743b1c15676872901.png, assuming that V(x) is known with a relative accuracy of 5fcf77e147597637226407.png0.83% in the space norm 5fcf78136aeb9305292142.png([-π, π])



The program, when launched and the user enters a number 5fcf77e147597637226407.png, as a result of the work should output:
  1. Graph of the function V(x)
  2. Function graph 5fcf7743b1c15676872901.png(on the same scale as the V(x) graph)
  3. The number m is the number of intervals on each of which the function is 5fcf7743b1c15676872901.pngconstant

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question