Intgeration by parts function
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 31 de En. de 2021
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.
Respuestas (1)
Teddy Negrete Peña
el 2 de Feb. de 2021
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 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!