Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Submission of homework 3 #1

Open
wants to merge 21 commits into
base: review_branch
Choose a base branch
from
Open

Submission of homework 3 #1

wants to merge 21 commits into from

Conversation

lovc21
Copy link
Collaborator

@lovc21 lovc21 commented Aug 17, 2023

This is my solution for the pendulum problem using RK4.

@lovc21 lovc21 requested a review from mrcinv August 17, 2023 17:57
Copy link
Collaborator

@mrcinv mrcinv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice solution. The whole project is of high quality. 👍👍


---
TLDR the documentation.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add link to published documentation.


![Equation](https://latex.codecogs.com/svg.latex?g/l\sin(\theta(t))+\theta''(t)=0,\theta(0)=\theta_0,\theta'(0)=\theta'_0)

At the end will also compered the whit a oscillating pendulum and a harmonic pendulum.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whit a -> with an

The period of the pendulum.
"""
function find_period(displacement, h)
peaks = findall(diff(sign.(diff(displacement))) .< 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It is easiear to find zeros than peaks.
  2. You should use one of the numerical methods for solving nonlinear equations to get more accurate result for the period. For example Newton's method. See Vaje14 for explanation on how to do it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants