Skip to content

About Autodifferentiation tutorial #1

@jdcfd

Description

@jdcfd

Hello,

I wondering why the solution to the forward problem is:

def F(v, alpha, x2):
    "Forward physics model"
    return -(g/2)*((x2 / v * alpha.cos())**2) + (x2*(alpha.sin()/alpha.cos()))

and not

def F(v, alpha, x2):
    "Forward physics model"
    return -(g/2)*(x2 / (v * alpha.cos()))**2 + (x2*alpha.sin()/alpha.cos())

You will notice I added an extra parenthesis to the first term. The two yield different results. Shouldn't the extra parenthesis be used, so that x2 is divided by v*alpha.cos() ??

Thanks. -JD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions