I was trying to solve this integral x/(x-6)dx and I used substitution. u = x-6 and x = u+6.
In the end, I ended up with the answer x+6ln|x-6|-6+C, however, the answer is x+6ln|x-6|+C without the -6. Can someone help me understand why this is the…
Here is a piece of my code with the summation. It includes an integral. all the variables peppered in there have float or integer values.
import numpy as np
import math
import scipy.integrate
from mpmath import nsum, inf
sum1 = nsum(lambda m:…
I have the following question:
what I do is:
set.seed(1)
N = 10000
f = function(x,y) x^y * y^x
then I don't know how to proceed. Can somebody please explain to me how to do this? thanks!
So I'm working on an integral calculator right now, and it works fairly well, although as soon as defining y as x**2+x*2+2 it stops working. What prompts my program to work with y = x**2+2 but not with y = x**2+x*2+2?
import math as math
x0 = 0 …
Anyone know how to use Boost to solve simple definite integrals?
E.g. -x^2 + 1 from -1 to 1?
I have tried reading the boost documentation, but I can't seem to figure out how to properly pass the function.
Thanks
Edit: My attempt so far
using…
let's consider a two dimensional fonction f(x,y)
and tree points A,B,C with ABC a triangle
and i want to integrate the function f over the triangle ABC,
is there a way to do that in matlab?
thank you.
I'm using dynamic memory allocation to create new objects and the following error keeps showing up when I try to compile. I have dimensions_ created as an unsigned int so I'm not sure why this error shows up.
EuclideanVector.h:69:40: error: size in…
The program needs to compute define integral with a predetermined
accuracy (eps) with the Trapezoidal Rule and my function needs to return:
1.the approximate value of the integral.
2.the number of iterations.
My code:
from math import *
def…
Can anyone please prove this expression below? I saw this in a paper and trying to see where it is coming from.
integral(sign(A*w*cos(w*t+phi))*cos(w*t), t, 0, 2*pi/w) = 4/pi*cos(phi)
I have to implement a numerical computation of double integrals in Java.
Concentrating on the integrate() function, here's what I have to far:
public static double Integrate(Integravel integrando, boolean pontoMedio) {
double sum = 0.0;
…
Can someone help me and tell what is the problem?
I have to calculate some integrals and I keep getting this errors.
Example:
quad('(x.^3)*(sqr.((x.^4)+1))',1,8)
??? Error using ==> inline.subsref at 14
Not enough inputs to inline function.
Error…
[Integration using python][1]
$\int_0^{\infinity}\frac{sin^{-1}\left(2x\right)}{1+x^2}dx$
integration of (arcsin(2x))/(1+x^2) dx [infinity, 0]
I can't seem to solve this problem using python. Can anyone help me with the solution?
I try to make a program to calculate integrals. I want to read the equation from a textbox and i don't know how to store it. For example i write in the textbox : 3x^2+2x+1. How can i make some arrays to store every member of that equation and to…