I have two surfaces, $p_a$ and $p_b$, described by two matrices. I want to find out if both surfaces intersect with the planes $q_a$ and $q_b$ respectively for any pair of x and y coordinates. To do this I set up an equation for the solution within each grid cell, and I traverse both matrices. For bilinear interpolation, Mathematica can find an analytic solution, but for bicubic interpolation I had to solve it numerically. The equation system for bicubic interpolation I want to solve analytically for $x$ and $y$ looks as follows:
$p_i(x,y)=\left(\begin{array}{cccc} 1 & x & x^2 & x^3 \end{array} \right).\left(\begin{array}{cccc} aa_i & ab_i & ac_i & ad_i \\ ba_i & bb_i & bc_i & bd_i \\ ca_i & cb_i & cc_i & cd_i \\ da_i & db_i & dc_i & dd_i \\ \end{array}\right).\left( \begin{array}{c} 1 \\ y \\ y^2 \\ y^3 \\ \end{array} \right)$
$p_a(x,y)=q_a$
$p_b(x,y)=q_b$
All symbols within the matrix are constant within each grid cell and are calculated from the points around the grid cell. I try to solve it in Mathematica by running the following code:
Subscript[p, i_][x_, y_] := {{1, x, x^2, x^3}} . {{Subscript[aa, i], Subscript[ab, i], Subscript[ac, i],Subscript[ad, i]}, {Subscript[ba, i], Subscript[bb, i], Subscript[bc, i], Subscript[bd, i]}, {Subscript[ca, i], Subscript[cb, i], Subscript[cc, i], Subscript[cd, i]}, {Subscript[da, i], Subscript[db, i], Subscript[dc, i], Subscript[dd, i]}} . {{1}, {y}, {y^2}, {y^3}} Solve[Subscript[p, a][x, y] == Subscript[q, a] && Subscript[p, b][x, y] == Subscript[q, b], {x, y}] This has been running for hours without any result. Is it possible to solve this analytically? Do I have the wrong approach?