Hi all, could you please help me to solve this equation either numerically of symbolically.

1 view (last 30 days)
Nic
Nic on 17 Apr 2013
I tried to solve this equation by using following code but could not.
eq = '(y*(lo-y))*((1-v)+((1-v^2)*(rc^2-y^2)/(rc^2+y^2)))*(((1/(lo*(lo-y)))-((1/lo^2)*log((lo-y)/y)))-((1/(lo*(lo-b)))-((1/lo^2)*log((lo-b)/b))))-(kw)==0';
[y] = solve (eq,y)
Warning: Explicit solution could not be found.
> In solve at 169
In sy1 at 15
y =
[ empty sym ]
In that equation everything is known except y.
Could you please help to solve this equation .
regards Nic

Answers (2)

Ahmed A. Selman
Ahmed A. Selman on 17 Apr 2013
If all variables other than (y) are known, then let's write some notes here:
1) Try to first define the variables, namely: kw, lo, rc, v, and b. This might ease up the syms solution a lot.
2) Reduce the number of symbols used, since there are few terms that can be replaced with constants as: (v^2-1), ln(-(b-lo)/b), 1/(lo*(b-lo)).
3) use the function pretty to show your equation (eq) more clearly - check it with what you originally want to solve, and apologies for the large space it'll take, so:
pretty(eq)
/ 2 2 2 \
| (v - 1) (rc - y ) |
- kw - y (lo - y) | v + ------------------- - 1 |
| 2 2 |
\ rc + y /
/ / b - lo \ / lo - y \ \
| ln| - ------ | ln| ------ | |
| 1 1 \ b / \ y / |
| ----------- + ----------- + -------------- - ------------ |
| lo (b - lo) lo (lo - y) 2 2 |
\ lo lo /
and this looks like:
eq = F(y)*G(y)-kw = 0
a special case when kw = 0, then
F(y)*G(y) = H(y) = 0
in such case, solutions of either
F(y) = 0 or
G(y) = 0
are also, solutions of H(y).
I've honestly tried to solve it with some numeric assumptions (to achieve #1 above), and it took a long time.. so I thought to pass my ideas here since they might help you, or others willing to help.. :)
  1 Comment
Nic
Nic on 18 Apr 2013
Thanks Ahmed, I have tried to simplify the equation. I tried to run ...but still warning message with : no explicit solution. here is the simplified code. clc; clear all; close all; syms y eq ='(y/lo)-(y/lo*lo)*(lo-y)*(log(lo-y)-log(y))-y(lo-y)*k1-k4*(k2+k3*((rc^2-y^2)/(rc^2-y^2)))^-1==0' solve(eq)
when I run it I got following message
Warning: Explicit solution could not be found. > In solve at 169 In sym_1 at 6
ans =
[ empty sym]
If you have any idea please suggest me.Thanks again

Sign in to comment.


Walter Roberson
Walter Roberson on 17 Apr 2013
You are asking to solve the equation for the variable "x", but there is no "x" in the equation.
On the other hand, the warning message you show apparently has an assignment to "y", and that assignment does not occur in your code.
  3 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!