Question: How do I get rid of the runtime warning? I don't understand where the division by zero is happening and I would like my y

 How do I get rid of the runtime warning? I don't

How do I get rid of the runtime warning? I don't understand where the division by zero is happening and I would like my y axis to start at 0

Excercise 5 Write a program to solve the equation by the relaxation method. Your only output should be a plot of the solution x as a function of c from 0 - 3 in steps of 0.001. You should find a clear trans tion of the regime where the solution goes from zero to non-zero. Use a target of 10 for the for estimation of the error in the solution, and use the first derivative to calculate it in the relaxation method loop. Use seperate functions for the right hand side f(x) and its derivative f'(x) in other words: def (e. ) return 1.0-numpy.cxp{-cx) and def pic,x): return ? The observed transiston is known as the percolation transition. In [2411 import numpy import matplotlib.pyplot as plot c-numpy.linspace(0,2,3000) def (,): return 1-nunpy.exp(- x) def Epic,x): return cnunpy.exp(-cex) x range(0, 200) def relax , fp,c,x): for i in range(100) Xp f( x) eps - '(x-xp)/11.-(1./fpic, x))) #first derivative is only used to contribute to cal it (numpy.abs iep)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!