×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Finding tangent at Spline Function

Finding tangent at Spline Function

Finding tangent at Spline Function

(OP)
Hello.
I have some piecewise polynomial (pp).
And I have to find a point with tangent = 45'.
How can I do it using built function in Spline ToolBox.
Thanks

RE: Finding tangent at Spline Function

To define a tangent line you need a point and a slope.

Let's say on the interval of interest the function is quadratic
y(x) = ax^2 + bx + c
y(45) = a*45^2 + b*45 + c
That is a point

dy/dx = 2ax + b
dy/dx(x=45) = 2*a*45 + b
That is a slope

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Finding tangent at Spline Function

I'm sorry, I thought you were looking for tangent at x=45 (easy problem).

Are you looking for a point with slope of 1 (45 degrees from axis)?

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Finding tangent at Spline Function

(OP)
yes, 45 degrees from axis
thanks

RE: Finding tangent at Spline Function

You want an angle 45 degrees from axis (assuming x and y axis are 1:1 ratio).  That corresponds to slope = +1 or -1.

Again assuming a quadratic fit...

y(x) = ax^2 + bx + c
dy/dx = 2ax + b

For dy/dx = 1
dy/dx = 2ax + b = 1
x = (1-b)/(2a)

For dy/dx = -1
dy/dx = 2ax + b = -1
x = (-1-b)/(2a)

Calculate the x for each of these and see if it falls within the interval that the quadratic is valid for.  If it is, then it is a point with 45 degree angle slope.  If both solutions (for slope = 1 and slope=-1) are outside of the interval that the quadratic is defined for, then there is no 45-degree slope in that interval.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources