Skip to main content
added 1070 characters in body
Source Link

I'm trying to solve quite a large equation for $x_2$ and for some reason Mathematica can't handle it. I'm not good enough at math to know why. I have a quadratic equation $f(x)=ax^2 + bx + c$, a point on the curve $(x_1, y_1)$, and a distance $L$. The length of a curve between 2 points given by:

Integrate[Sqrt[1 + (b + 2*a*x)^2], x]

this gives me:

-((ArcSinh[b + 2*a*Subscript[x, 1]] + (b + 2*a*Subscript[x, 1]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] + 4*a^2*Subscript[x, 1]^2])/(4*a)) +
(ArcSinh[b + 2*a*Subscript[x, 2]] + (b + 2*a*Subscript[x, 2]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] + 4*a^2*Subscript[x, 2]^2])/(4*a) == L

Given L and x_1, I need to figure out x_2. Or rather, I need to put x_2 in terms of {L, x_1, a, b}.

I'm pretty sure this is possible? If it isn't, I'd like to understand why. Here's my faulty code (it's big). Mathematica just responds with:

"Solve::nsmet: This system cannot be solved with the methods available to Solve."

Solve[FullSimplify[TrigToExp[-((ArcSinh[b + 2*a*Subscript[x, 1]] +
(b + 2*a*Subscript[x, 1]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] +
4*a^2*Subscript[x, 1]^2])/(4*a)) + (ArcSinh[b + 2*a*Subscript[x, 2]] +
 (b + 2*a*Subscript[x, 2]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] +
  4*a^2*Subscript[x, 2]^2])/(4*a) == L]], Subscript[x, 2]]/. Rule -> Equal

Update

So @Jack LaVigne's answer is probably the best way to handle this within Mathematica. However, my goal in all this was to find a solution that I could translate into traditional computer-language code for a dynamic quadratic equation defined by the (variable) coefficients ${a, b, c}$, a variable known length $L$, and an x-coordinate for a known point which I call $u$.

I found that the easiest way to get this into something I could translate into general-purpose computer code was using newtonian approximation. I made a very detailed step-by-step derivation of the solution in Mathematica:

https://drive.google.com/open?id=0B9YYph2TpOvrTVJ4aGFmMGxwVkU

Here is the Javascript code:

https://gist.github.com/sikanrong/bd7b05b800a5086c1502e2c7033127ed

You just pass in all the knowns, and it will run newton until it converges, and returns your answer, which is the x-coordinate for the unknown point which is a distance L along the curve away from the point at x-coordinate $u$.

I hope this helps people in the same situation.

I'm trying to solve quite a large equation for $x_2$ and for some reason Mathematica can't handle it. I'm not good enough at math to know why. I have a quadratic equation $f(x)=ax^2 + bx + c$, a point on the curve $(x_1, y_1)$, and a distance $L$. The length of a curve between 2 points given by:

Integrate[Sqrt[1 + (b + 2*a*x)^2], x]

this gives me:

-((ArcSinh[b + 2*a*Subscript[x, 1]] + (b + 2*a*Subscript[x, 1]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] + 4*a^2*Subscript[x, 1]^2])/(4*a)) +
(ArcSinh[b + 2*a*Subscript[x, 2]] + (b + 2*a*Subscript[x, 2]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] + 4*a^2*Subscript[x, 2]^2])/(4*a) == L

Given L and x_1, I need to figure out x_2. Or rather, I need to put x_2 in terms of {L, x_1, a, b}.

I'm pretty sure this is possible? If it isn't, I'd like to understand why. Here's my faulty code (it's big). Mathematica just responds with:

"Solve::nsmet: This system cannot be solved with the methods available to Solve."

Solve[FullSimplify[TrigToExp[-((ArcSinh[b + 2*a*Subscript[x, 1]] +
(b + 2*a*Subscript[x, 1]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] +
4*a^2*Subscript[x, 1]^2])/(4*a)) + (ArcSinh[b + 2*a*Subscript[x, 2]] +
 (b + 2*a*Subscript[x, 2]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] +
  4*a^2*Subscript[x, 2]^2])/(4*a) == L]], Subscript[x, 2]]/. Rule -> Equal

I'm trying to solve quite a large equation for $x_2$ and for some reason Mathematica can't handle it. I'm not good enough at math to know why. I have a quadratic equation $f(x)=ax^2 + bx + c$, a point on the curve $(x_1, y_1)$, and a distance $L$. The length of a curve between 2 points given by:

Integrate[Sqrt[1 + (b + 2*a*x)^2], x]

this gives me:

-((ArcSinh[b + 2*a*Subscript[x, 1]] + (b + 2*a*Subscript[x, 1]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] + 4*a^2*Subscript[x, 1]^2])/(4*a)) +
(ArcSinh[b + 2*a*Subscript[x, 2]] + (b + 2*a*Subscript[x, 2]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] + 4*a^2*Subscript[x, 2]^2])/(4*a) == L

Given L and x_1, I need to figure out x_2. Or rather, I need to put x_2 in terms of {L, x_1, a, b}.

I'm pretty sure this is possible? If it isn't, I'd like to understand why. Here's my faulty code (it's big). Mathematica just responds with:

"Solve::nsmet: This system cannot be solved with the methods available to Solve."

Solve[FullSimplify[TrigToExp[-((ArcSinh[b + 2*a*Subscript[x, 1]] +
(b + 2*a*Subscript[x, 1]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] +
4*a^2*Subscript[x, 1]^2])/(4*a)) + (ArcSinh[b + 2*a*Subscript[x, 2]] +
 (b + 2*a*Subscript[x, 2]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] +
  4*a^2*Subscript[x, 2]^2])/(4*a) == L]], Subscript[x, 2]]/. Rule -> Equal

Update

So @Jack LaVigne's answer is probably the best way to handle this within Mathematica. However, my goal in all this was to find a solution that I could translate into traditional computer-language code for a dynamic quadratic equation defined by the (variable) coefficients ${a, b, c}$, a variable known length $L$, and an x-coordinate for a known point which I call $u$.

I found that the easiest way to get this into something I could translate into general-purpose computer code was using newtonian approximation. I made a very detailed step-by-step derivation of the solution in Mathematica:

https://drive.google.com/open?id=0B9YYph2TpOvrTVJ4aGFmMGxwVkU

Here is the Javascript code:

https://gist.github.com/sikanrong/bd7b05b800a5086c1502e2c7033127ed

You just pass in all the knowns, and it will run newton until it converges, and returns your answer, which is the x-coordinate for the unknown point which is a distance L along the curve away from the point at x-coordinate $u$.

I hope this helps people in the same situation.

added 7 characters in body
Source Link
David G. Stork
  • 42.3k
  • 3
  • 37
  • 106

So I'm trying to solve quite a large equation for x_2$x_2$ and for some reason mathematicaMathematica can't handle it. I'm not good enough at math to know why. I have a quadratic equation f(x)=ax^2 + bx + c$f(x)=ax^2 + bx + c$, a point on the curve (x_1, y_1)$(x_1, y_1)$, and a distance L$L$. The length of a curve between 2 points given by:

Integrate[Sqrt[1 + (b + 2*a*x)^2], x]

this gives me:

-((ArcSinh[b + 2*a*Subscript[x, 1]] + (b + 2*a*Subscript[x, 1]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] + 4*a^2*Subscript[x, 1]^2])/(4*a)) +
(ArcSinh[b + 2*a*Subscript[x, 2]] + (b + 2*a*Subscript[x, 2]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] + 4*a^2*Subscript[x, 2]^2])/(4*a) == L

Given L and x_1, I need to figure out x_2. Or rather, I need to put x_2 in terms of {L, x_1, a, b}.

I'm pretty sure this is possible? If it isn't, I'd like to understand why. Here's my faulty code (it's big). Mathematica just responds with:

"Solve::nsmet: This system cannot be solved with the methods available to Solve."

Solve[FullSimplify[TrigToExp[-((ArcSinh[b + 2*a*Subscript[x, 1]] +
(b + 2*a*Subscript[x, 1]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] +
4*a^2*Subscript[x, 1]^2])/(4*a)) + (ArcSinh[b + 2*a*Subscript[x, 2]] +
 (b + 2*a*Subscript[x, 2]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] +
  4*a^2*Subscript[x, 2]^2])/(4*a) == L]], Subscript[x, 2]]/. Rule -> Equal

So I'm trying to solve quite a large equation for x_2 and for some reason mathematica can't handle it. I'm not good enough at math to know why. I have a quadratic equation f(x)=ax^2 + bx + c, a point on the curve (x_1, y_1), and a distance L. The length of a curve between 2 points given by:

Integrate[Sqrt[1 + (b + 2*a*x)^2], x]

this gives me:

-((ArcSinh[b + 2*a*Subscript[x, 1]] + (b + 2*a*Subscript[x, 1]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] + 4*a^2*Subscript[x, 1]^2])/(4*a)) +
(ArcSinh[b + 2*a*Subscript[x, 2]] + (b + 2*a*Subscript[x, 2]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] + 4*a^2*Subscript[x, 2]^2])/(4*a) == L

Given L and x_1, I need to figure out x_2. Or rather, I need to put x_2 in terms of {L, x_1, a, b}.

I'm pretty sure this is possible? If it isn't, I'd like to understand why. Here's my faulty code (it's big). Mathematica just responds with:

"Solve::nsmet: This system cannot be solved with the methods available to Solve."

Solve[FullSimplify[TrigToExp[-((ArcSinh[b + 2*a*Subscript[x, 1]] +
(b + 2*a*Subscript[x, 1]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] +
4*a^2*Subscript[x, 1]^2])/(4*a)) + (ArcSinh[b + 2*a*Subscript[x, 2]] +
 (b + 2*a*Subscript[x, 2]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] +
  4*a^2*Subscript[x, 2]^2])/(4*a) == L]], Subscript[x, 2]]/. Rule -> Equal

I'm trying to solve quite a large equation for $x_2$ and for some reason Mathematica can't handle it. I'm not good enough at math to know why. I have a quadratic equation $f(x)=ax^2 + bx + c$, a point on the curve $(x_1, y_1)$, and a distance $L$. The length of a curve between 2 points given by:

Integrate[Sqrt[1 + (b + 2*a*x)^2], x]

this gives me:

-((ArcSinh[b + 2*a*Subscript[x, 1]] + (b + 2*a*Subscript[x, 1]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] + 4*a^2*Subscript[x, 1]^2])/(4*a)) +
(ArcSinh[b + 2*a*Subscript[x, 2]] + (b + 2*a*Subscript[x, 2]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] + 4*a^2*Subscript[x, 2]^2])/(4*a) == L

Given L and x_1, I need to figure out x_2. Or rather, I need to put x_2 in terms of {L, x_1, a, b}.

I'm pretty sure this is possible? If it isn't, I'd like to understand why. Here's my faulty code (it's big). Mathematica just responds with:

"Solve::nsmet: This system cannot be solved with the methods available to Solve."

Solve[FullSimplify[TrigToExp[-((ArcSinh[b + 2*a*Subscript[x, 1]] +
(b + 2*a*Subscript[x, 1]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] +
4*a^2*Subscript[x, 1]^2])/(4*a)) + (ArcSinh[b + 2*a*Subscript[x, 2]] +
 (b + 2*a*Subscript[x, 2]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] +
  4*a^2*Subscript[x, 2]^2])/(4*a) == L]], Subscript[x, 2]]/. Rule -> Equal
deleted 45 characters in body
Source Link

So I'm trying to solve quite a large equation for x_2 and for some reason mathematica can't handle it. I'm not good enough at math to know why. I have a quadratic equation f(x)=ax^2 + bx + c, a point on the curve (x_1, y_1), and a distance L. The length of a curve between 2 points given by:

LIntegrate[Sqrt[1 =+ integral(sqrt(1+(f'(x))^2)) over theb range+ {x_12*a*x)^2], x_2}x]

where f'(x) == 2ax + b - this gives me:

-((ArcSinh[b + 2*a*Subscript[x, 1]] + (b + 2*a*Subscript[x, 1]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] + 4*a^2*Subscript[x, 1]^2])/(4*a)) +
(ArcSinh[b + 2*a*Subscript[x, 2]] + (b + 2*a*Subscript[x, 2]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] + 4*a^2*Subscript[x, 2]^2])/(4*a) == L

Given L and x_1, I need to figure out x_2. Or rather, I need to put x_2 in terms of {L, x_1, a, b}.

I'm pretty sure this is possible? If it isn't, I'd like to understand why. Here's my faulty code (it's big). Mathematica just responds with:

"Solve::nsmet: This system cannot be solved with the methods available to Solve."

Solve[FullSimplify[TrigToExp[-((ArcSinh[b + 2*a*Subscript[x, 1]] +
(b + 2*a*Subscript[x, 1]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] +
4*a^2*Subscript[x, 1]^2])/(4*a)) + (ArcSinh[b + 2*a*Subscript[x, 2]] +
 (b + 2*a*Subscript[x, 2]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] +
  4*a^2*Subscript[x, 2]^2])/(4*a) == L]], Subscript[x, 2]]/. Rule -> Equal

So I'm trying to solve quite a large equation for x_2 and for some reason mathematica can't handle it. I'm not good enough at math to know why. I have a quadratic equation f(x)=ax^2 + bx + c, a point on the curve (x_1, y_1), and a distance L. The length of a curve between 2 points given by:

L = integral(sqrt(1+(f'(x))^2)) over the range {x_1, x_2}

where f'(x) == 2ax + b - this gives me:

-((ArcSinh[b + 2*a*Subscript[x, 1]] + (b + 2*a*Subscript[x, 1]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] + 4*a^2*Subscript[x, 1]^2])/(4*a)) +
(ArcSinh[b + 2*a*Subscript[x, 2]] + (b + 2*a*Subscript[x, 2]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] + 4*a^2*Subscript[x, 2]^2])/(4*a) == L

Given L and x_1, I need to figure out x_2. Or rather, I need to put x_2 in terms of {L, x_1, a, b}.

I'm pretty sure this is possible? If it isn't, I'd like to understand why. Here's my faulty code (it's big). Mathematica just responds with:

"Solve::nsmet: This system cannot be solved with the methods available to Solve."

Solve[FullSimplify[TrigToExp[-((ArcSinh[b + 2*a*Subscript[x, 1]] +
(b + 2*a*Subscript[x, 1]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] +
4*a^2*Subscript[x, 1]^2])/(4*a)) + (ArcSinh[b + 2*a*Subscript[x, 2]] +
 (b + 2*a*Subscript[x, 2]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] +
  4*a^2*Subscript[x, 2]^2])/(4*a) == L]], Subscript[x, 2]]/. Rule -> Equal

So I'm trying to solve quite a large equation for x_2 and for some reason mathematica can't handle it. I'm not good enough at math to know why. I have a quadratic equation f(x)=ax^2 + bx + c, a point on the curve (x_1, y_1), and a distance L. The length of a curve between 2 points given by:

Integrate[Sqrt[1 + (b + 2*a*x)^2], x]

this gives me:

-((ArcSinh[b + 2*a*Subscript[x, 1]] + (b + 2*a*Subscript[x, 1]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] + 4*a^2*Subscript[x, 1]^2])/(4*a)) +
(ArcSinh[b + 2*a*Subscript[x, 2]] + (b + 2*a*Subscript[x, 2]) * 
Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] + 4*a^2*Subscript[x, 2]^2])/(4*a) == L

Given L and x_1, I need to figure out x_2. Or rather, I need to put x_2 in terms of {L, x_1, a, b}.

I'm pretty sure this is possible? If it isn't, I'd like to understand why. Here's my faulty code (it's big). Mathematica just responds with:

"Solve::nsmet: This system cannot be solved with the methods available to Solve."

Solve[FullSimplify[TrigToExp[-((ArcSinh[b + 2*a*Subscript[x, 1]] +
(b + 2*a*Subscript[x, 1]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 1] +
4*a^2*Subscript[x, 1]^2])/(4*a)) + (ArcSinh[b + 2*a*Subscript[x, 2]] +
 (b + 2*a*Subscript[x, 2]) * Sqrt[1 + b^2 + 4*a*b*Subscript[x, 2] +
  4*a^2*Subscript[x, 2]^2])/(4*a) == L]], Subscript[x, 2]]/. Rule -> Equal
added 6 characters in body
Source Link
Loading
added 50 characters in body
Source Link
george2079
  • 39.1k
  • 1
  • 44
  • 111
Loading
Source Link
Loading