# trouble in integral solving [SOLVED]

4 ビュー (過去 30 日間)
akle 2019 年 3 月 13 日
コメント済み: Torsten 2019 年 3 月 14 日
Hi dear friends.
I am to compute biot-savart law integration form to find magnetic field. I am stucked in integrating. I get some hypergeom and limit functions etc. this my code:
clear all
I = 8e-3; % A in z direction
syms z
P = [2 3 4]; % measure point
dl = [0 0 1]; % distance diferential segment
ar = [2 3 (4-z)]; % unit vector through line segment to point
R = sqrt(ar(1)^2 + ar(2)^2 + ar(3)^2); % radial distance from the line
intIcerik = ((cross(dl,ar)) ./ (R^(3/2)));
fun = intIcerik(1); % fun = intIcerik(2) and fun = intIcerik(3); also needed x,y,z components
q = int(fun,[-Inf Inf])
% H = -294ax + 196ay mA/m is the answer
so how can I fix it. thanks in advance.

#### 0 件のコメント

サインイン to comment.

### 回答 (1 件)

Torsten 2019 年 3 月 13 日

q = vpa ( int(fun,[-Inf Inf]) )

#### 2 件のコメント

akle 2019 年 3 月 14 日
thanks for reply. but by that way I get this:
0.43819128971906348762190740493226*limit((z - 4)*hypergeom([1/2, 3/4], 3/2, -(z - 4)^2/13), z, -Inf) - 0.43819128971906348762190740493226*limit((z - 4)*hypergeom([1/2, 3/4], 3/2, -(z - 4)^2/13), z, Inf)
EDIT: SOLVED.
fun = matlabFunction( intIcerik(1)) % fun = intIcerik(2) and fun = intIcerik(3); also needed
q = integral(fun, -Inf, Inf)
Thanks again
Torsten 2019 年 3 月 14 日
From Octave I get
q = int(fun,[-Inf Inf]);
q = (sym)
3/4 ____
-3*13 * \/ pi * Gamma(1/4)
----------------------------------------
13*Gamma(3/4)
qq = vpa(q)
qq = (sym) -8.2852884441119270961330163677715

サインイン to comment.

サインイン してこの質問に回答します。