how to find intersect with 2 lines (2024)

4 Ansichten (letzte 30 Tage)

Ältere Kommentare anzeigen

JEEVITHA am 18 Nov. 2023

  • Verknüpfen

    Direkter Link zu dieser Frage

    https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines

  • Verknüpfen

    Direkter Link zu dieser Frage

    https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines

Kommentiert: Sam Chak am 19 Nov. 2023

In MATLAB Online öffnen

find the points of intersection between 𝑥^2+𝑦^2=3 and 𝑥𝑦=1. Convert this into a system of two nonlinear algebraic equations.solve a system of two nonlinear algebraic equations using multivariable Newton-Raphson method with an initial guess of 𝑥=1, 𝑦=1.

dx = 0.1;

x = 0:0.1:5;

f2=xy-1

f1=x.^2+y.^2-3;

y2 = 1×51

1.7321 1.7349 1.7436 1.7578 1.7776 1.8028 1.8330 1.8682 1.9079 1.9519 2.0000 2.0518 2.1071 2.1656 2.2271 2.2913 2.3580 2.4269 2.4980 2.5710 2.6458 2.7221 2.8000 2.8792 2.9597 3.0414 3.1241 3.2078 3.2924 3.3779

figure(1)

p = plot(x, y1, x, y2);

p(1).LineStyle = "-.";

p(2).LineWidth = 2;

how to find intersect with 2 lines (2)

r = find(y1 == y2);

x_intersection = x(r);

x_value_intersection = y1(r);

figure(2)

3 Kommentare

1 älteren Kommentar anzeigen1 älteren Kommentar ausblenden

Steven Lord am 18 Nov. 2023

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#comment_2966322

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#comment_2966322

This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.

If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB.

If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.

Sam Chak am 18 Nov. 2023

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#comment_2966402

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#comment_2966402

Hi @JEEVITHA,

I understand that Newton–Raphson doesn't require plotting as long as it can find the intersection using the numerical method. However, as advised previously, you should plot the circle and the reciprocal function. Follow the steps provided, even though the homework question does not explicitly require you to plot them.

This will aid in your learning if you genuinely want to understand the material, not just for the sake of submitting the homework and passing the course.

Sam Chak am 19 Nov. 2023

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#comment_2966832

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#comment_2966832

Hi @JEEVITHA

I see the reciprocal function in y1, but I don't see the circle in y2.

Can you please show the original question again?

Melden Sie sich an, um zu kommentieren.

Melden Sie sich an, um diese Frage zu beantworten.

Antworten (1)

Sam Chak am 18 Nov. 2023

  • Verknüpfen

    Direkter Link zu dieser Antwort

    https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#answer_1355512

  • Verknüpfen

    Direkter Link zu dieser Antwort

    https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#answer_1355512

Hi @JEEVITHA

If you post like this, your question will likely be closed by the mods later. Please plot the circle and the reciprocal function on the same graph using the plot() function.

Do you know what the Newton–Raphson algorithm is? Without seeing the procedure, I cannot provide guidance. Of course, I can search on Google, but it's better if you search since this is your homework.

1 Kommentar

-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Sam Chak am 19 Nov. 2023

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#comment_2966917

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2048902-how-to-find-intersect-with-2-lines#comment_2966917

In MATLAB Online öffnen

Hi @JEEVITHA

The curves are incorrectly plotted because f1 and f2 in your code are unused. The circle requires some algebraic manipulations to plot upper and lower arcs.

As a hint, if you are proficient in pure math algebraic manipulations, you will arrive at the answers with the values related to the Golden Ratio. As you can see, the intersections are around x = ±0.6 and x = ±1.6.

% circle: x² + y² = 3

x1 = linspace(-sqrt(3), sqrt(3), 347);

y1a = sqrt(3 - x1.^2); % upper arc

y1b = - sqrt(3 - x1.^2); % lower arc

plot(x1, y1a, x1, y1b, 'color', '#0920b8'), hold on

% reciprocal function: y = 1/x

x2a = linspace(0.35, 3, 266);

x2b = linspace(-3, -0.35, 266);

y2 = @(x) 1./x;

plot(x2a, y2(x2a), x2b, y2(x2b), 'color', '#b80909')

% labels

legend('Circle', '', 'Reciprocal fcn', '')

xlabel('x'), ylabel('y')

grid on

axis equal

how to find intersect with 2 lines (9)

Melden Sie sich an, um zu kommentieren.

Melden Sie sich an, um diese Frage zu beantworten.

Siehe auch

Kategorien

Mathematics and OptimizationSymbolic Math ToolboxMathematicsCalculus

Mehr zu Calculus finden Sie in Help Center und File Exchange

Tags

  • point of intersion and linear differntial equation

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Es ist ein Fehler aufgetreten

Da Änderungen an der Seite vorgenommen wurden, kann diese Aktion nicht abgeschlossen werden. Laden Sie die Seite neu, um sie im aktualisierten Zustand anzuzeigen.


Translated by how to find intersect with 2 lines (10)

how to find intersect with 2 lines (11)

Website auswählen

Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .

Sie können auch eine Website aus der folgenden Liste auswählen:

Amerika

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europa

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asien-Pazifik

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Kontakt zu Ihrer lokalen Niederlassung

how to find intersect with 2 lines (2024)

FAQs

How to find intersect with 2 lines? ›

Two distinct lines intersect

intersect
In geometry, an intersection is a point, line, or curve common to two or more objects (such as lines, curves, planes, and surfaces).
https://en.wikipedia.org › wiki › Intersection_(geometry)
at the most at one point. To find the intersection of two lines we just need to solve their equations. The alternative way is to graph the lines and find their point of intersection. The lines will intersect only if they are non-parallel lines.

How to calculate the intersection of two lines? ›

To algebraically find the intersection of two straight lines, write the equation for each line with y on the left side. Next, write down the right sides of the equation so that they are equal to each other and solve for x.

How to find the intersection of two lines vectors? ›

To find the point of intersection of these two lines, we must find a point P that lies on both lines. At the point of intersection the coordinates for L1 will equal the coordinates for L2. This means there exist values of s and t such that the x, y and z coordinates of the two lines are equal.

How to find the point of intersection of two graphs? ›

The Intersection Between Two Graphs

You find the point where the graph of f and the graph of g intersects by solving the equation f ( x ) = g ( x ) . Insert x into f ( x ) = − x − 1 because it's the simpler expression of the two. You could also insert x into g ( x ) , but it would be more work.

How do you find the intersection of two functions? ›

Here's a step-by-step process:
  1. Write down the equations of the two functions, f(x) and g(x).
  2. Set the two functions equal to each other: f(x) = g(x).
  3. Solve the equation for x. ...
  4. For each x-value found in step 3, plug it back into either f(x) or g(x) to find the corresponding y-value.

How is intersection calculated? ›

We can find the probability of the intersection of two independent events as, P(A∩B) = P(A) × P(B), where, P(A) is the Probability of an event “A” and P(B) = Probability of an event “B” and P(A∩B) is Probability of both independent events “A” and "B" happening together.

What is the formula for angle of intersection of two lines? ›

The angle between two lines whose slopes are m1 and m2 is given by the formula tan-1|(m1 - m2)/(1 + m1 m2)|.

What is the formula for the intersection of two sets? ›

A ∩ B = {x : x ∈ A and x ∈ B}

That means x is an element of A ∩ B, if and only if x is an element of both A and B. Thus, we can use the word “AND” to represent the intersection of sets. Sometimes, the above expression can also be referred to as the intersection of sets formula.

How do you find the intersection of two relations? ›

For b , going off the last example, the intersection R1∩R2 would consist of ordered pairs {(1,1)}. Now applying that idea here, R1∩R2 relation would be {(a,b)|a divides b or a is a multiple of b} or {(a,b)|a=cb or b=ak for some integers k and c}.

How to check if two lines intersect? ›

In the general case, we know the line segments AB and CD intersect if the points C and D straddle the line through AB and the points A and B straddle the line through CD. Otherwise, in the general case we use our half space equations. The half space g(x) defined by CD is g(P)=(D−C)×(P−C)=0.

What is the formula for point of intersection? ›

The point of intersection formula is used to find the point of intersection of the two lines, that is the meeting point of two lines. These two lines can be represented by the equation a1x+b1y+c1=0 and a2x+b2y+c2=0, respectively. It is possible to find point of intersection of three or more lines.

What is the intersection of two straight lines? ›

Two straight lines will intersect at a point if they are not parallel. The point of intersection is the meeting point of two straight lines. If two crossing straight lines have the same equations, the intersection point can be found by solving both equations at the same time.

How do you find the point of intersection of two lines? ›

To find the point of intersection algebraically, solve each equation for y, set the two expressions for y equal to each other, solve for x, and plug the value of x into either of the original equations to find the corresponding y-value. The values of x and y are the x- and y-values of the point of intersection.

How to find the intersection of two lines quadratic? ›

We can plot both the quadratic curve y = f(x) and the line y = g(x) on a graph. If the curve and the line intersect, then we can find the x-coordinate(s) of the intersection by solving f(x) = g(x), i.e. the quadratic equation ax^2 + (b - p)x + (c - q) = 0.

What is the intersection of two number lines? ›

Answer: A coordinate plane is formed by two number lines that intersect at right angles. The point of intersection is the ZERO on each number line – it is called the origin. The two number lines are called the axes.

References

Top Articles
Latest Posts
Article information

Author: Msgr. Refugio Daniel

Last Updated:

Views: 6129

Rating: 4.3 / 5 (74 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Msgr. Refugio Daniel

Birthday: 1999-09-15

Address: 8416 Beatty Center, Derekfort, VA 72092-0500

Phone: +6838967160603

Job: Mining Executive

Hobby: Woodworking, Knitting, Fishing, Coffee roasting, Kayaking, Horseback riding, Kite flying

Introduction: My name is Msgr. Refugio Daniel, I am a fine, precious, encouraging, calm, glamorous, vivacious, friendly person who loves writing and wants to share my knowledge and understanding with you.