Previous in Forum: Milky Way Galaxy Stickers   Next in Forum: Stress Analyst
Close
Close
Close
25 comments
Rate Comments: Nested
Guru

Join Date: Sep 2006
Posts: 4513
Good Answers: 88

MatLab, et al Users?

12/27/2007 11:47 PM

Hello CR4,

Solve the following for x:

s = ±x·(4a2x2 + 1)½ + (1/2a)·loge[2ax ± (4a2x2 + 1)½]

where a ε R.

Any brave souls care to tackle this one?

Cheers,
-e

Register to Reply
Pathfinder Tags: contour integral parabola path
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Engineering Fields - Control Engineering - New Member China - Member - New Member

Join Date: Sep 2006
Location: CHINA
Posts: 2945
Good Answers: 14
#1

Re: MatLab, et al Users?

12/28/2007 1:40 AM

Hi, Eman,

you are challenging cr4? you are good at the calculation. but you still post this question, it must be very very difficult problem.

what is R? real number or radius? as well as S? area? or other thing?

What dont you try Mathematica, mathcad or this matlab by yourself?

Register to Reply
Guru

Join Date: Sep 2006
Posts: 4513
Good Answers: 88
#3
In reply to #1

Re: MatLab, et al Users?

12/28/2007 8:09 AM

a is a Real number; ie, a is an element of the set of Real numbers. It is not a complex number. In this equation it is a constant.

s is Real. Units of length. This equation was generated by a path integral.

I don't have Mathematica, MathCad or MatLab. Tried several online solvers, but they gagged on this one. I will be installing Maxima, the Open Source version of Macsyma on my Linux box, probably this weekend.

Register to Reply
Guru
Engineering Fields - Control Engineering - New Member China - Member - New Member

Join Date: Sep 2006
Location: CHINA
Posts: 2945
Good Answers: 14
#8
In reply to #3

Re: MatLab, et al Users?

12/29/2007 6:29 AM

Can you post the path integral? may it has differnet integral result

another formula may easily draw.

why dont you use Ln symbol? allof your colleagues like to use the Loge?

Register to Reply
Power-User

Join Date: Apr 2007
Posts: 270
Good Answers: 19
#2

Re: MatLab, et al Users?

12/28/2007 7:41 AM

looks like this is the solution to a problem already! there is a quadratic root equation lurking within!

does 1/2a = 1/(2a) or 1/2a = a/2

so "a" is real but can "x" be complex then? and "s"?

__________________
omw7
Register to Reply
Guru

Join Date: Sep 2006
Posts: 4513
Good Answers: 88
#4
In reply to #2

Re: MatLab, et al Users?

12/28/2007 8:17 AM

Hello omw7,

1/2a = 1/(2a). Sorry about the ambiguity.

More strictly,

...(1/(2a))·loge[...

or

...(loge[...])/(2a)

a is Real.

s and x are Real, though it is possible they may take on complex values. Physically meaningful values are Real.

Register to Reply
Power-User

Join Date: Apr 2007
Posts: 270
Good Answers: 19
#5
In reply to #4

Re: MatLab, et al Users?

12/28/2007 8:38 AM

Cross multiplying by 2a and substituting 2ax=y

2as = y√(y²+1)+loge[y+√(y²+1)]

is a simplification just too make it look easier (I have omitted the ± as the √ implies this)

s, x and y are all real (not complex numbers such as a + ib where i=√-1)

let also t=√(y²+1) to obtain a parametric equation

then 2as = yt + loge(y+t)

this then needs plotting. i can't think of a way of seperating the loge from the normal y value, indeed I don't think that it can be done except in special circumstances (I should add that I would love to know how to do it otherwise). Perhaps in using the expansion of loge and then saying as y tends to 0 or some such.

not much help I'm afraid.

__________________
omw7
Register to Reply
Guru
Engineering Fields - Control Engineering - New Member China - Member - New Member

Join Date: Sep 2006
Location: CHINA
Posts: 2945
Good Answers: 14
#7
In reply to #5

Re: MatLab, et al Users?

12/29/2007 6:02 AM

Your thinking is right, Im same of yours at first.

why dont you all use loge rather than Ln symbol?

It seems a special equation socalled exceed equation(?)(how to speak in englissh?). at first , the (m+(m2+1)^1/2 >0, where m=2a. and

Register to Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#9
In reply to #5

Re: MatLab, et al Users?

12/29/2007 9:34 AM

I can't see whether the following leads anywhere, but for what it's worth:

If you substitute p/2=arcsinh(y) you get:
2.a.s = sinh(p/2).cosh(p/2) + p/2
a.s = sinh(p) + p/4

Register to Reply
Guru

Join Date: Aug 2005
Location: Hemel Hempstead, UK
Posts: 5826
Good Answers: 322
#21
In reply to #5

Re: MatLab, et al Users?

12/31/2007 6:14 AM

Simple mans solution use Excel. Notice that root(y2+1) is always bigger than y, so the second ± term must always be positive. I've plotted the two possible graphs of omw7's 2as.

__________________
If you spend all your time looking for people and things to complain about: trust me, you will find plenty to complain about.
Register to Reply
Guru
Popular Science - Biology - New Member Hobbies - Musician - New Member APIX Pilot Plant Design Project - Member - New Member Hobbies - CNC - New Member Fans of Old Computers - ZX-81 - New Member

Join Date: Jan 2007
Location: Centurion, South Africa
Posts: 3921
Good Answers: 97
#6

Re: MatLab, et al Users?

12/28/2007 5:27 PM

Hi Europium

First I would rearrange the formula to end with x = f(x)

Then Iterate to find the values of x.

Do you have a compiler?

I have an old DOS program EUREKA by Borland here somewhere that would do it.

__________________
Never do today what you can put of until tomorrow - Student motto
Register to Reply
Guru

Join Date: Nov 2007
Location: Sherwood Park, Alberta, Canada
Posts: 1212
Good Answers: 74
#10
In reply to #6

Re: MatLab, et al Users?

12/29/2007 3:29 PM

If values for s and a are stipulated, x can be found by trial and error. Otherwise, I don't know how to find a general expression for x.

Reminds me of the old ladder puzzle. Two walls are parallel and x feet apart. Two ladders of length 20' and 30' respectively rest at the base of each wall and lean on the opposite wall forming a sort of unsymmetrical 'X' shape. The intersection point is 10' above ground. Solve for x. Not so easy, but if you turn the problem around and say the walls are 10' apart...solve for height, it's a snap.

__________________
Bruce
Register to Reply
Commentator

Join Date: Nov 2007
Posts: 85
Good Answers: 4
#11

Re: MatLab, et al Users?

12/29/2007 7:14 PM

x=-1/2*(-exp(-(lambertw((16*a+1)^(1/2)/a^2*exp((16*a+1+2*s*a)/a^2))*a^2-16*a-1-2*s*a)/a^2)+(16*a+1)^(1/2))/a

Not sure what the Lambert's W function represents

but this is what Matlab gives me.


Chazl

Register to Reply
Guru
Engineering Fields - Control Engineering - New Member China - Member - New Member

Join Date: Sep 2006
Location: CHINA
Posts: 2945
Good Answers: 14
#12
In reply to #11

Re: MatLab, et al Users?

12/29/2007 7:44 PM

Most of times, root expression is not too important.

In fact, you can simplization the equation as metioned above and then draw it trends, so that you can gt more univeral result.

try this by hand draw,

y axies marked by Ln and x axis marked by scale unit of men, where m=2ax; then you can seee the trend of m(x)

Register to Reply
Guru

Join Date: Sep 2006
Posts: 4513
Good Answers: 88
#13
In reply to #11

Re: MatLab, et al Users?

12/29/2007 10:54 PM

Hello Chazl,

Would you do a screen capture of MatLab's output and post it here as an image? If MatLab shows the intermediate steps to the solution, please post them as well.

Thanks!
-e

Register to Reply
Commentator

Join Date: Nov 2007
Posts: 85
Good Answers: 4
#15
In reply to #13

Re: MatLab, et al Users?

12/30/2007 12:17 AM

Hey Europium,

It did not show the intermediate steps but here is the screen capture.

Not sure how this is going to display.

>> syms s d x a
>> d=x*sqrt(4*a*2^2 + 1) + (1/2*a)*log(2*a*x + sqrt(4*a*2^2 + 1))-s

d =

x*(16*a+1)^(1/2)+1/2*a*log(2*a*x+(16*a+1)^(1/2))-s


>> solve (d,x)

ans =

-1/2*(-exp(-(lambertw((16*a+1)^(1/2)/a^2*exp((16*a+1+2*s*a)/a^2))*a^2-16*a-1-2*s*a)/a^2)+(16*a+1)^(1/2))/a


>>

Chazl

Register to Reply
Guru

Join Date: Sep 2006
Posts: 4513
Good Answers: 88
#18
In reply to #15

Re: MatLab, et al Users?

12/30/2007 6:35 PM

Hello Chazl,

Would you mind running this through MatLab again? Note that I've made slight changes to the equation as entered to make it conform to the original problem. The changes are marked in bold...

>> syms s d x a

as entered:

>> d=x*sqrt(4*a*2^2 + 1) + (1/2*a)*log(2*a*x + sqrt(4*a*2^2 + 1))-s

edited:

>> d=x*sqrt(4*a^2*x^2 + 1) + (1/(2*a))*log(2*a*x + sqrt(4*a^2*x^2 + 1))-s

alternatively [simpler]:

>> d=x*sqrt((2*a*x)^2 + 1) + (1/(2*a))*log(2*a*x + sqrt((2*a*x)^2 + 1))-s

d = ?

>> solve (d,x)

ans = ?

Thanks. I sure appreciate your help on this!

-e

Register to Reply
Commentator

Join Date: Nov 2007
Posts: 85
Good Answers: 4
#19
In reply to #18

Re: MatLab, et al Users?

12/30/2007 8:47 PM

Europium,

I see my error.. thanks for the correction.

I ran the corrected equation and cannot get a solution using Matlab.

This is my readout:

d =

x*(4*a^2*x^2+1)^(1/2)+1/2/a*log(2*a*x+(4*a^2*x^2+1)^(1/2))-s


>> solve (d,x)
??? Error using ==> solve
Unable to find closed form solution.

Error in ==> sym.solve at 49
[varargout{1:max(1,nargout)}] = solve(S{:});


Chazl

Register to Reply
Guru

Join Date: Sep 2006
Posts: 4513
Good Answers: 88
#20
In reply to #19

Re: MatLab, et al Users?

12/30/2007 10:17 PM

Chazl,

Thanks for all your help. This baby's gonna have to be solved numerically <sigh>.

Register to Reply
Guru

Join Date: Sep 2006
Posts: 4513
Good Answers: 88
#14
In reply to #11

Re: MatLab, et al Users?

12/29/2007 11:37 PM

Hello Chazl,

I suspected x(s) did not have a closed-form solution (the presence of the Lambert W function in the solution confirms this).

There is a very nice writeup about the Lambert W on Wiki, by the way. It is useful for solving equations of the form x = W(s)eW(s). s(x) can be reduced to a similar exponential form suitable to this approach.

-e

PS: The Italians call it the Woo function. There is no 'W' in the Italian alphabet.

Register to Reply
Anonymous Poster
#16

Re: MatLab, et al Users?

12/30/2007 12:06 PM

x=+-20

Register to Reply
Guru

Join Date: Sep 2006
Posts: 4513
Good Answers: 88
#17
In reply to #16

Re: MatLab, et al Users?

12/30/2007 1:14 PM

For all values of a and s? If only the world were so simple!

Register to Reply
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4496
Good Answers: 137
#22

Re: MatLab, et al Users?

01/02/2008 4:21 AM

Hello Europium

Can't solve analytically for x if x (and powers of) are added to loge(x plus powers of).

But if you post values for s and a I can find a specific solution for x using Mathcad.

Cheers

Codey

__________________
Give masochists a fair crack of the whip
Register to Reply
Guru
Engineering Fields - Control Engineering - New Member China - Member - New Member

Join Date: Sep 2006
Location: CHINA
Posts: 2945
Good Answers: 14
#25
In reply to #22

Re: MatLab, et al Users?

01/03/2008 12:37 AM

where a is a parameter. you can select it in the range of real number. but when a is negtive, it seems no solution.

Register to Reply
Guru
Engineering Fields - Control Engineering - New Member China - Member - New Member

Join Date: Sep 2006
Location: CHINA
Posts: 2945
Good Answers: 14
#23

Re: MatLab, et al Users?

01/02/2008 10:24 PM

Hi, Eman,

How did you all spend your new year day?

I try to show you the graphic as follow.

Register to Reply
Guru
Engineering Fields - Control Engineering - New Member China - Member - New Member

Join Date: Sep 2006
Location: CHINA
Posts: 2945
Good Answers: 14
#24

Re: MatLab, et al Users?

01/02/2008 10:27 PM

here is another for a =1 to 9

Register to Reply
Register to Reply 25 comments
Copy to Clipboard

Users who posted comments:

Anonymous Poster (1); ba/ael (1); Chazl (3); cnpower (7); Codemaster (1); Hendrik (1); omw7 (2); Physicist? (1); Randall (1); user-deleted-13 (7)

Previous in Forum: Milky Way Galaxy Stickers   Next in Forum: Stress Analyst

Advertisement