# Caída libre en Dimorfo

Otro ejercicio en el que la ayuda de un entorno de programación como [SageMath](/dart/apendice-i/fisica-computacional.md) resulta inestimable es el siguiente: el análisis del movimiento de caída libre en Dimorfo comparándolo con la caída libre en la Tierra.&#x20;

### Caída libre desde dos metros

Si dejamos caer un cuerpo desde una altura de 2 m, representar las gráficas posición-tiempo y velocidad-tiempo de este movimiento (despreciando el rozamiento con el aire) no es nada complicado; se trata de representar una parábola y una recta, respectivamente. Pero si tenemos que repetir las mismas gráficas para el caso de que el cuerpo se dejase caer en DImorfo, entonces las cosas empiezan a volverse tediosas de más. Es el momento de pedirle ayuda a SageMath para que represente las gráficas por nosotros. De paso, también podemos calcular cuánto tiempo tarda en caer el objeto y con qué velocidad llega al suelo, para comparar la caída libre en ambos astros.

Copia el siguiente código en una celda [SageMathCell](https://sagecell.sagemath.org/) y pulsa el botón “Evaluate” para ver el resultado, o accede directamente al programa en este [enlace](https://sagecell.sagemath.org/?z=eJy1VEtu2zAQ3RvwHQh5ITmRE9tN-jGgRQqlRRbdpGo2RRsw0sglQIkGSTF1b9MDZNUj-GIdmvrYchMUaBogEM0Zvnnz-IaGShL42h8PB8PBiMSQs5KlbPOrJBkQThXJqzJlogRFVlRSklKeVhxPcUpWQtW560CPydruGeAiZRnNiLF7UJKqJB-uP13YAhnkmLqehsTgPw2JHi-GA4J_vu9fblMLYVjBoNSCSEg145uHEgRGWC5kAQVGgNAUOEiaidCdxnLIdI_Rtg3KiS22R6sJGBeoodwhij0AJ5pBsRJEN-hgKuAG9gtgZ5jKSqWppaQXToQIK5JjRD_S-JmenB_RI_11jv05MAm6kuWfkxqJTPCf5HkuFTqcQxWMU8HYBrGrfuPNfu03qoUiwccr9B9KEhHUwNjvdDhYJvh9c_J6hssYl2cnr2By5s5dphWtXYkMkFHCQEqKIPZQZ7HJMrEqIqjdd7q2e4dAMSuEzAXCxD2YuIaJd2DiDiZxWuHIpHTzkFESKIxoWxQHKruVQuhgjXXx4Gw6tnqMWs463k-L67SpTRx1pGyhm63y1EqPt8c5LHEUcaXwbjDF5P0-E8s679OOa95XeGnSUC7q6UYlJawkKPRR7Yal3PzMWdq0hDwpt0V00vyy4LOpA3xfZ6tuUibOSHiLktrQ9opWvBYk0Ntua9xxSFLBhYz80fn5y7fzdz7aE5aA2nB6BzzynWj2vWrg4hYu7sHFHdydFPflAVgtbfP6deRbg_fJm5a8eQ7ypiVv_pX8NaiKaxz64WAlWakD74LjxNGFF24fQa_wxk2oXXh94y66JG_i6FoAKaoyC3QSzpGVp3aTaho7WfFBVpd-074ch_Z9sjY628EWp0-XR7OHLw4ScaG-ifug8-AxaQ0U4pJlnOErECWyArwCpjlE_uNuxtug30G5u1DRZ1_b-cBdf02CYux_2YvfKvYDolmPhNkhYf6GRN-Vj5MwSOJUPUbjN8lVd3I=\&lang=sage\&interacts=eJyLjgUAARUAuQ==).

```python
var ('t')

# Definición de las funciones para calcular la posición y(t) y la velocidad v(t) en un MRUA

def y(y0, v0, a, t):
    '''En un movimiento rectilíneo uniformemente acelerado,
    dadas la posición inicial y0, la velocidad inicial v0, la aceleración a y el tiempo t,
    devuelve la posición en el instante t: y(t) = y0 + v0*t + 0.5*a*t^2'''
    return y0 + v0*t + 0.5*a*t^2

def v(v0, a, t):
    '''En un movimiento rectilíneo uniformemente acelerado,
    dadas la velocidad inicial v0, la aceleración a y el tiempo t,
    devuelve la velocidad en el instante t: v(t) = v0 + a*t'''
    return v0 + a*t

# Datos (SI)
y0 = 2
v0 = 0
gT = 9.81
gD = 4.7e-4

# Ecuaciones en la Tierra
yT = y(y0, v0, -gT, t)
vT = v(v0, -gT, t)

# Ecuaciones en Dimorfo
yD = y(y0, v0, -gD, t)
vD = v(v0, -gD, t)

# Tiempo de caída (s)
tT = find_root(yT, 0, 10)    # Tierra
tD = find_root(yD, 0, 1000)  # Dimorfo

# Velociadad al llegar al suelo
vfT = v(v0, -gT, tT)
vfD = v(v0, -gD, tD)

# Intervalos para la representación gráfica (s)
tfinalT = tT
tfinalD = 10

# Gráficas posición-tiempo
graficayT = plot(yT, (t, 0, tfinalT), color='#556B2F', legend_label='Tierra')
graficayD = plot(yD, (t, 0, tfinalD), color='brown', legend_label='Dimorfo')

# Gráficas velocidad-tiempo
graficavT = plot(vT, (t, 0, tfinalT), color='#556B2F', legend_label='Tierra')
graficavD = plot(vD, (t, 0, tfinalD), color='brown', legend_label='Dimorfo')

# Resultado
print("Altura:", y0, "m")
print()
print("Tiempo de caída:")
print("-Tierra:", round(tT,2), "s")
print("-Dimorfo:", round(tD,2), "s")
print()
print("Velocidad al llegar al suelo:")
print("-Tierra:", round(vfT,2), "m/s")
print("-Dimorfo:", round(vfD,3), "m/s")
print()
show(graficayT + graficayD, gridlines=True, title='Gráficas posición-tiempo', axes_labels=['t (s)', 'y (m)'], axes_labels_size=1)
show(graficavT + graficavD, gridlines=True, title='Gráficas velocidad-tiempo', axes_labels=['t (s)', 'v (m/s)'], axes_labels_size=1)
```

Las gráficas y-y y v-t que hemos obtenido para una caída libre desde 2 m son las siguientes. ¿Qué conclusiones puedes sacar a la vista de estas gráficas?

<figure><img src="/files/CqktScVPdgHILec6ZJnx" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/uKM50IbhXY82kY0vAyIN" alt=""><figcaption></figcaption></figure>

### Salto vertical&#x20;

Otro movimiento que podemos analizar con SageMath es el que estudiamos en el apartado sobre el [asteroide Dimorfo](/dart/el-asteriode-dimorfo.md): ¿qué sucedería si el jugador de la NFL Chris Conley saltase en Dimorfo?

Las gráficas de un salto vertical con velocidad 5 m/s, en la Tierra y en Dimorfo, se incluyen a continuación ¿Qué conclusiones puedes sacar a la vista de estas gráficas?

<figure><img src="/files/O3oBGSb0H00sWCbLxLs1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ap5EbZLaEju4b5HQSZVR" alt=""><figcaption></figcaption></figure>

Para representar estas gráficas hemos modificado ligeramente el programa anterior. Copia el código en una celda [SageMathCell](https://sagecell.sagemath.org/) y pulsa el botón “Evaluate” para ver el resultado, o accede directamente al programa en este [enlace](https://sagecell.sagemath.org/?z=eJy1lE1u2zAQhfcGfIcBspDsOGlixP0JoEULpUUW3aTuqmgDRho7BCjRICkm7m1ygKx6BF-sj6Zsx04NFGhqwJDA4Xzz5nEoLwyliUt63U63c0A5T2QtC7n4VVPJpISlSVMXUtdsaSaMoEKoolHIUoJm2rZ756nr0TyseVa6kKUoyYc1rqmp6fPV1_ehQMkTbJ2fDMjjLwbkeufdDuGXJMnFcmulvawk106T4cJJtXisWSMiJ9pUXCHCJApWbESpBzEb5aB0S9GyDaEoFNuStQr4GGhRMUmgB1bkJFczTW5FZ9-w8rxdAJ1hq6ytE0GSO48mZKhIh6D3HR4nx6O-6LsfQ_QXYYZdY-o_b1pZ5NP_ZM9LubDhPHfBRxd8aBBd7Ta-Wm_nTThtKf1yifmDJRmddDs-PEfdznSM57vjt6d4zfF6dvyGj85i3kXRiHYqoQCKxpKNEYCEpM2IHU3HwUVAw3r0db32HJTLSpuJBibfweQtJn-CyTeYcfTqVsCHpZ8KzQqqFg_3shJbGim1SHKVuAcKt628Nlq71EMUqKct8BJuGi-UjrcO2YZnhi3Otz2lqVk8TGSBnh0oOMqMhv2AjYBPbdhuRvYonijsNCKEll7NFIrPUTx1SwER1htQoZU2WXIwGr3-MPyYYEx4ylCrxA2rLInNhO_Gipavafle2o3Rd_UzVmv76iO0kb6es13pfi3dv4B0v5bu_1H6FdtGOdy8bsfe6rt04_QhrX0a4FWWSmLosrFpGLWkU5wl-88MdcU921jVZt8SF8YIq8mc0qqXfN-KX1v5k7MwSk9F-Cci_N-I2HV_vwgPEa_sPhm_AZgeBao=\&lang=sage\&interacts=eJyLjgUAARUAuQ==).

```python
var ('t')

# Definición de las funciones para calcular la posición y(t) y la velocidad v(t) en un MRUA

def y(y0, v0, a, t):
    '''En un movimiento rectilíneo uniformemente acelerado,
    dadas la posición inicial y0, la velocidad inicial v0, la aceleración a y el tiempo t,
    devuelve la posición en el instante t: y(t) = y0 + v0*t + 0.5*a*t^2'''
    return y0 + v0*t + 0.5*a*t^2

def v(v0, a, t):
    '''En un movimiento rectilíneo uniformemente acelerado,
    dadas la velocidad inicial v0, la aceleración a y el tiempo t,
    devuelve la velocidad en el instante t: v(t) = v0 + a*t'''
    return v0 + a*t

# Datos (SI)
y0 = 0
v0 = 5
gT = 9.81
gD = 4.7e-4

# Ecuaciones en la Tierra
yT = y(y0, v0, -gT, t)
vT = v(v0, -gT, t)

# Ecuaciones en Dimorfo
yD = y(y0, v0, -gD, t)
vD = v(v0, -gD, t)

# Tiempo hasta la altura máxima en la Tierra (s)
tmax = find_root(vT, 0, 1)

# Intervalo para la representación gráfica
tfinal = 2*tmax

# Gráficas posición-tiempo
graficayT = plot(yT, (t, 0, tfinal), color='#556B2F', legend_label='Tierra')
graficayD = plot(yD, (t, 0, tfinal), color='brown', legend_label='Dimorfo')

# Gráficas velocidad-tiempo
graficavT = plot(vT, (t, 0, tfinal), color='#556B2F', legend_label='Tierra')
graficavD = plot(vD, (t, 0, tfinal), color='brown', legend_label='Dimorfo')

# Resultado
show(graficayT + graficayD, gridlines=True, title='Gráficas posición-tiempo', axes_labels=['t (s)', 'y (m)'], axes_labels_size=1)
show(graficavT + graficavD, gridlines=True, title='Gráficas velocidad-tiempo', axes_labels=['t (s)', 'v (m/s)'], axes_labels_size=1)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bpadin-fisica.gitbook.io/dart/apendice-i/caida-libre-en-dimorfo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
