I’m trying to evaluate a Taylor polynomial for the natural logarithm, ln(x), centred at a=1 in Python. I’m using the series given on Wikipedia however when I try a simple calculation like ln(2.7) instead of giving me something close to 1 it gives me a gigantic number. Is there something obvious that I’m doing wrong? ..

#### Category : math

I’m trying to minimize the following function: with respect to the parameters H and alpha using the brute force method, specifically the scipy.optimize.brute algorithm. The problem arises that I don’t know how to deal with this unknown number of variables, I mean, that is 2n variables and n is an input of the program. I ..

Consider you are standing at position ‘A’ and your destination is position ‘B’ (in a straight line). You car’s fuel tank could hold fuel for ‘L’ km/miles. There are ‘n’ gas stations in the way of ‘A’ and ‘B’ including ‘A’ as the first gas station and ‘B’ as last gas station. You will be ..

This is kind of a stupid question but: I need to get a float that represents my user’s portfolio, so I need to check for the input to be a number and if it contains a comma I want to change it with a dot. I’ve got this piece of code: portfolio_size = input(‘Insert portfolio ..

I want to know if there is any way to differentiate a whole number from any other output only using maths, eg if you have the number 5 I would like to convert that into the number 0 using equations, however, the number 5.4342 would output the number -1 (What i am trying to do ..

I have a floating point number with "n" number of digits in the fractional part. How can I obtain the fractional part as an integer in python3 ? I know this question has been asked numerous times but I am not able to find a case where the length of the fractional part is unknown. ..

In Excel I have following formula: =(B11* (1-(1 / (1 + ((100-B8)/200)))^B14)/((100-B8)/200)) + (100*(1 / (1 + ((100-B8)/200)))^B14) I know result of this equation, say it is 150. I also know value of B11 and B14. They are constant. I need to find out what B8 is. In Excel I use Solver to calculate B8 ..

i have 4 vertices of rectangle say A,B,C,D where A(3,3) B(10,5) C(11,8) D(4,6). Say 4 z coordinates corresponding to 4 vertices are a,b,c,d. Then dot product of adjacent sides will be equal to zero as it is at right angle. so doing the same we got 4 equations like below (b-a)(d-a) = -13 (a-d)(c-d)=13 (d-c)(b-c)=13 ..

Was solving the second answer of this link https://math.stackexchange.com/questions/4044245/there-is-a-rectangle-in-3-dimensional-space-if-i-am-only-given-the-x-and-y but getting value error : Math domain error as below i have written my code x1 = 10 y1 = 5 x2 = 11 y2 = 8 x3 = 4 y3 = 6 c1 = ((x1-x2+x3)*(x2-x3)) + ((y1-y2+y3)*(y2-y3)) c2 = -((x3 * (x2-x3))+(y3 * (y2-y3))) * ..

I have a csv file with few records : If there is 1 line the function counts correctly. But if i add another records (like in the picture) I have an error: How can I avoid it? This is my code: data = pd.read_csv (r’C:UsersKLSAJDoDesktopProjekt.csv’) p = [(data[‘x_start’]), (data[‘y_start’])] q = [(data[‘x_end’]), (data[‘y_end’])] print (math.dist(p, ..

## Recent Comments