Animating z surface math functions
Animate using shape keys and drivers.
Example script using z function surface addon.  Default equation 1 - (a * x**2 + y**2) for a = [0..9].  Create a shape for each using bpy.ops.mesh.primitive_z_function_surface(...) (the operator from the addon) passing the substituted a to the operator as the equation property. (eg for a=3 equation=&quot;1 - (3 * x**2 + y**2)&quot; .)
The separate objects are joined using bpy.ops.object.join_shapes()
import bpy
context = bpy.context 
# 10 shapes over 101 frames

scene = context.scene
vl = context.view_layer
shapes = 10
obs = []

for i in range(shapes):
    bpy.ops.mesh.primitive_z_function_surface(
                    equation=&quot;1 - (%d * x**2 + y**2)&quot; % i,
                    div_x=16,
                    div_y=16,
                    size_x=2,
                    size_y=2)

    ob = context.object
    ob.name = &quot;a=%d&quot; % i

    obs.append(ob)

shape = obs.pop(0)
vl.objects.active = shape

for ob in obs:
    ob.select_set(True)

bpy.ops.object.join_shapes()
for ob in obs:
    bpy.data.objects.remove(ob)

# add a discrete driver animation (10 frames of each)
keys = shape.data.shape_keys.key_blocks

for i in range(1, shapes):
    shape = keys.get(&quot;a=%d&quot; % i)
    d = shape.driver_add(&quot;value&quot;)
    d.driver.expression = &quot;frame // 10 == %d&quot; % i

Note the animation uses drivers.  Make sure autorun is enabled
Make sure the Add Mesh : Extra Objects addon is enabled too