Intgeration by parts function
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi all,
I am new to the function of intgeration by parts, I would like to display and answer the following equation:
∫▒〖w (∂^2 u)/∂x+(∂^2 u)/∂y+(∂^2 u)/∂z dx〗
int(w(d^2u/dx+d^2u/dy+d^2u/dz)dx)=0
can anyone help me how to write this and use the function of intgeration by parts
댓글 수: 6
Walter Roberson
2021년 1월 31일
MATLAB automatically does integration by parts when it can figure out the pattern using the content already present in expressions. It will not create new unknown function U to differentiate that just happens to have the magic propery that int(f,x) is 0. You have to supply that creativity.
You can simplify a bit by knowing that if w is a constant, then int(w*G(x,y,z)) = w * int(G(x,y,z)) and with the integral equalling 0 then int(G(x,y,z)) must equal 0, where G(x,y,z) = diff(u,x,x) + diff(u,y,y) + diff(u,z,z). So the w is a red herring, of no use at all... not unless I was right the first time and the w is only multiplying diff(u,x,x) rather than the whole sum.
Suppose U = c1*x^a1 + c2*y^a2 + c3*y^a3 then diff(U,x) = a1*c1*x^(a1-1), diff(U,x,x) = (a1-1)*a1*c1*x^(a1-2) and by symmetry diff(U,y,y) = (a2-1)*a2*c2*y^(a2-2) and diff(U,z,z) = (a3-1)*a3*c3*z^(a3-2) . Sum of those is
(a1-1)*a1*c1*x^(a1-2) + (a2-1)*a2*c2*y^(a2-2) + (a3-1)*a3*c3*z^(a3-2)
Integrate with respect to x:
a1*c1*x^(a1-1) + x*(a2-1)*a2*c2*y^(a2-2) + x*(a3-1)*a3*c3*z^(a3-2)
so
x*(a1*c1*x^(a1-2) + (a2-1)*a2*c2*y^(a2-2) + (a3-1)*a3*c3*z^(a3-2)) = 0
But that has to be true for all x, y, z, not just x = 0, so the the x^(a1-2), y^(a2-2), z^(a3-2) have to vanish. So let a1=2, a2=2, a3=2, getting
2*c1 + (2-1)*2*c2 + (2-1)*2*c3 = 0
c1 = -c2-c3
But this is only one of the possibilities, and does not take advantage of integration by parts.
답변 (1개)
Teddy Negrete Peña
2021년 2월 2일
Indeed you can use Matlab to check what you do analytically by hand, but before using Matlab functions, you must interpret that the "int" function can analytically solve an integral, but it must pose it one by one and use symbolic variables.
When you apply Integration by parts you must solve 2 integrals, the integral of dv and the integral vdu, then those integrals must be raised in the code.
Sincerely,
Teddy
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!