PL EN DE RU UA
Nuclear Medicine

Calculator

(formerly accessible on: www.nuk.bieganski.org)

General math & medicine options

Arithmetic mean and standard deviation
Regression of points to straight line, correlation coefficient
Finding of natural divisors
The highest common divisor
Polynomials
Time difference
Estimation of some human biometric parameters
Concentration conversion
Pharmacokinetic compartment models

Calculations related to nuclear physics

Examples of application of the programs below are accessible here.
Simple radioactive decay (1 radioactive nuclide: A → B)
Successive radioactive decay (2 radioactive nuclides: A → B → C)
Successive radioactive decay (3 radioactive nuclides: A → B → C → D)
Conversion of activity units (traditional into SI-derived and vice versa)
Conversion of mass into activity and vice versa (mass-units into activity-units and vice versa)

Calculations related to nuclear medicine

Instruction for the programs below is accessible here.
(1.) Calculation of thyroid volumen on the basis of the lobes diameters
(2.) Calculation of (radio)nuclide uptake (f.e. uptake of radioiodine in the thyroid)
 (2a.) Calculation of uptake of I-131 in the thyroid (This program can be saved as a file and launched in another PC, a browser with HTML and JavaScript is necessary; in Polish).
(3.) Calculation of radioiodine dose (simplified)
(4.) Kinetic modeling I. (effective half-time, maximal uptake and others, based on a series of measures) - for radionuclide therapy
(5.) Kinetic modeling II. (effective half-time, maximal uptake and others, based on three measures) - for radionuclide therapy
(6.) Calculation of dose of radioiodine or another radionuclide for treatment (modified Marinelli-formula)
(7.) Dosimetry of α- and β-radiation
(8.) Dose rate and absorbed dose of γ radiation (in a distance from a point source)

Polynomials

Calculation of the roots of linear, quadratic, cubic, quartic and quintic equation:
0= a5·x5+a4·x4+a3·x3+a2·x2+a1·x1+a0·x0
Enter the coefficients of the polynomial (a5, a4, a3, a2, a1, a0):
a5a4a3a2a1a0



Algorithms

Algorithms used for calculation of the roots of polynomials degree from 0 to 5 of general formula:
0= a5·x5+a4·x4+a3·x3+a2·x2+a1·x1+a0·x0

Linear equation 0= a·x+b

The root: x0= -b/a.

Quadratic equation 0= a·x2+b·x+c:

Calculation of the roots:
1. The discriminant Δ= b2-4·a·c.
2. The three variants:
- for Δ>0: two real different roots,
- dla Δ=0: a double root (two the same roots),
- dla Δ<0: two complex roots.
3. Determination of the extremum from the derivative (2·a·x+b): x= -b/(2·a), y= -Δ/(4·a).
4. Determination of the focus (x= -b/(2·a), y= -Δ/(4·a)+1/(4·a)) and the directrix (y= -Δ/(4·a)-1/(4·a)) of the parabola.

Cubic equation 0= a·x3+b·x2+c·x+d

1. The discriminant Δ3= -27·a2·d2+18·a·b·c·d-4·a·c3-4·b3·d+b2·c2,
and the parameters of the "depressed cubic": 0= y3+p·x+q (after the substitution x=y-b/(3·a)):
Δ3b= Δ3/(-27·a4),
p= c/a-b2/(3·a2),
q= 2·b3/(27·a2)-b·c/(3·a2)+d/a,
where: Δ3b= q2+4/27·p3.
2. The three variants:
 I. Δ3<0 (only one real root exists: r):
  r= {curt[-q/2+sqrt(Δ3b)/2]+curt[-q/2-sqrt(Δ3b)/2]}-b/(3·a)
  (where curt() is the cubic root of the number in the parenthesis),
  factorization: 0= (x-r)·(aq·x2+bq·x+cq),
  where: aq= a, bq= b+a·r, cq= c+b·r+a·r2.
 II. Δ3= 0 (a multiple root exists):
  The two variants:
   a) p= 0 and q= 0 (the triple root):
    x1,2,3= curt(d/a),
    factorization: 0= a·(x-x1,2,3)3;
   b) p<0 and q>0 (double root):
    x3= 2·curt(-q/2)-b/(3·a); x1,2= -curt(-q/2)-b/(3·a);
    factorization: 0= a·(x-x1,2)2·(x-x3)
 I. Δ3>0 (three different real roots):
  Φ= atan2[sqrt(-Δ3b),-q];
  x1, x2, x3 = 2/3·sqrt(-3·p)·cos(Φ/3+2·k·π/3)-b/(3·a) for k= 0, 1 and 2,
  factorization: 0= a·(x-x1)·(x-x2)·(x-x3)
3. Determination of the local extrema from the derivative (3·a·x2+2·b·x+c) and of the inflection point from the second derivative (6·a·x+2·b).

Quartic equation 0= a4·x4+a3·x3+a2·x2+a1·x+a0

Discriminant: Δ4= 256·a43·a03 -192·a42·a3·a1·a02 -128·a42·a22·a02 +144·a42·a2·a12·a0 -27·a42·a14 +144·a4·a32·a2·a02 -6·a4·a32·a12·a0 -80·a4·a3·a22·a1·a0 +18·a4·a3·a2·a13 +16·a4·a24·a0 -4·a4·a23·a12 -27·a34·a02 +18·a33·a2·a1·a0 -4·a33·a13 -4·a32·a23·a0 +a32·a22·a12
1. Presentation as monic quartic 0= a4·(x4+a·x3+b·x2+c·x+d),
where a= a3/a4, b= a2/a4, c= a1/a4, d= a0/a4.
Then factorization into two quadratics (according to S. Shmakov, IJPAM, 2011):
0= (x2+g1·x+h1)·(x2+g2·x+h2), where:
  i:    a= g1+g2
  ii:    b= h1+h2+g1·g2
  iii:    c= g1·h2+g2·h1
  iiii:    d= h1·h2
2. Resolvent cubic: 0= y3+(-b)·y2+(a·c-4·d)·y+(4·b·d-c2-a2·d)
The solution follows according to the algorithm given above. Only one root is needed, and the proper one must be chosen.
3. Subsidiary quadratics G and H:
  G:  0= g2+(-a)·g+(b-y)
  H:  0= h2+(-y)·h+(d)
The solution follows according to the algorithm given above. Thus, one obtains the four numbers:
g1 and g2 (solutions to the equation G), and hk and hn (solutions to the equation H).
4. Verification, how the numbers hk and hn satisfy the equation iii. So one determines, which of the numbers hk and hn corresponds to h1 and which to h2.
In this way, the quartic was decomposed into two quadratic factors.
5. Finding of the roots of the above quadratics (according to the algorithm given above) is identical to the finding of the roots of the primary quartic.
6. Determination of the local extrema from the derivative and of the inflection points from the second derivative.

Quintic equation 0= a5·x5+a4·x4+a3·x3+a2·x2+a1·x+a0

1. Monic quaintic 0= a5·(x5+A·x4+B·x3+C·x2+D·x+E),
where A= a4/a5, B= a3/a5, C= a2/a5, D= a1/a5, E= a0/a5.
2. Determination of the range, within which all the roots must be, with the Cauchy limit:
  ρ2= 1+max(1,A,B,C,D,E).
  All the roots must be within the range from -ρ2 to +ρ2;
  because this is a monic quintic, the value of the function for -ρ2 must be negative, and for +ρ2 must be positive.
3. Iterative approaching of the value of one of the roots (x5) with bisection method:
  3.1. Preliminary assumption: x51= ρ2, x52= -ρ2.
  3.2. Computation of x5: x5= (x51+x52)/2.
  3.3. Calculation of the value of the monic quintic function for x5:
   3.3.1. The value of the function = 0 →: leave the loop (the root has been found);
   3.3.2. The value of the function > 0 →: x5→x51, go to 3.2.;
   3.3.3. The value of the function < 0 →: x5→x52, go to 3.2.;
  in tis way, one of the roots is gradually approached till a satisfying accuracy is reached.
 This procedure can be simplified, if E= 0. Then, x5= 0, and a= A, b= B, c= C and d= D.
4. After the x5 is determined, the quintic is decomposed into a first degree binomial and a quartic:
  0= a5·(x-x5)·(x4+a·x3+b·x2+c·x+d), where:
  a= A+x5,
  b= B+A·x5+x52,
  c= C+B·x5+A·x52+x53,
  d= D+C·x5+B·x52+A·x53+x54;
5. Solution of the quartic (for factorization into quadratics and, optionally, for finding of the roots) follows according to the above algorithm.
6. Determination of the local extrema from the derivative and of the inflection points from the second derivative.


©Author: Cyprian Świętaszczyk, 2013; last update: 07.2020