Solve a nonlinear equation

Hi, Could you please help me to solve this equation in terms of "q"
1.082 [ (q-1) log((3/4 -3q/4)/(1-3q/4))+ q*log((3q/4) *(3/4 -3q/4)] + 1.4427[-3log(1-q/2) *((q/2) -1)+(q/2+1/2)^2 *log(q/2+1/2)- (3q/4 -1)*log(1-3q/4)- (3q/4+1/4)*log(3q/4+1/4)] + 0.7213[q*log(q/2)* ( -q-3/2 +1/q)+ (-q-1)*log(q/2 +1/2) + q*(-q/2+1/2)*log(1/2-q/2)-3*log(1-q/2)-(q-1)*log(1/2 - q/2)] -0.36 *[(q-1)^2*log(1/2 - q/2)]=0

2 Comments

log 10 or natural logarithms?
cm
cm on 18 Nov 2013
Edited: Walter Roberson on 23 Apr 2017
Natural Logarithm
Let me re write it as it is shown in MATLAB command window:
1.082 *( (q-1) *log((3/4 -3*q/4)/(1-3*q/4))+ q*log((3*q/4)* (3/4 -3*q/4)) )+ 1.4427*(-3*log(1-q/2) *((q/2) -1)+((q/2+1/2)^2) *log(q/2+1/2)- (3*q/4 -1)*log(1-3*q/4)- (3*q/4+1/4)*log(3*q/4+1/4)) + 0.7213*(q*log(q/2)*( -q-3/2 +1/q)+ (-q-1)*log(q/2 +1/2) + q*(-q/2+1/2)*log(1/2-q/2)-3*log(1-q/2)-(q-1)*log(1/2 - q/2)) -0.36 *((q-1)^2*log(1/2 - q/2))
thanks,

Sign in to comment.

 Accepted Answer

Walter Roberson
Walter Roberson on 18 Nov 2013
If you assume natural logs, then there are no non-complex solutions.
The value of the expression (assuming natural logs) is negative between 0 and 1 (going to negative infinity at those two bounds.) Outside of that range, the expression is real-valued at exactly one point near -3.000138648 and at exactly one point near 1.851008154. At those two exceptional locations, the expression has positive non-zero values. The fact that there are negative values and positive values does not, however, imply that there are points at which the function is real-valued and 0, as the function is discontinuous.
The results have the same shape if log10 is used instead of ln.

6 Comments

Note to myself for my future reference:
(541/500) * (q-1) * ln((3/4-(3/4) * q) / (1-(3/4) * q))+(541 / 500) * q * ln((3/4) * q * (3/4-(3/4) * q))-(43281/10000) * ln(1-(1/2) * q) * ((1/2) * q-1)+(14427/10000) * ((1/2) * q+1/2)^2 * ln((1/2) * q+1/2)-(14427/10000) * ((3/4) * q-1) * ln(1-(3/4) * q)-(14427/10000) * ((3/4) * q+1/4) * ln((3/4) * q+1/4)+(7213/10000) * q * ln((1/2) * q) * (-q-3/2+1/q)+(7213/10000) * (-q-1) * ln((1/2) * q+1/2)+(7213/10000) * q *(-(1/2) * q+1/2) * ln(-(1/2) * q+1/2)-(21639/10000) * ln(1-(1/2) * q)-(7213/10000) * (q-1) * ln(-(1/2) * q+1/2)-(9/25) * (q-1)^2 * ln(-(1/2) * q+1/2)
cm
cm on 18 Nov 2013
Thanks, but the point is that we have another constraint that q only should get the values between 0 and 1 since its the value of probability density! does this equation have any answer in this range?
Walter has already told you that it does not.
Negative probability densities ??
Thanks, but the point is that we have another constraint that q only should get the values between 0 and 1 since its the value of probability density!
If you really mean "probability density" then q should be required to be positive, but not less than 1. Only probability mass functions and CDFs have that requirement.
cm
cm on 18 Nov 2013
yes I was looking for a value between 0 and 1 but it seems that the equation can not satisfy this constraint

Sign in to comment.

More Answers (3)

Matt J
Matt J on 18 Nov 2013
solve, fzero, fsolve?

1 Comment

cm
cm on 18 Nov 2013
I used "solve" but the process took so long without any appropriate result! i will be so pleased if you introduce some thing that works for this equation, some stronger function

Sign in to comment.

syms q
>> ex = 1.082*( (q-1)*log((3/4 -3*q/4)/(1-3*q/4))+ q*log((3*q/4) *(3/4 -3*q/4)) + 1.4427*(-3*log(1-q/2) *((q/2) -1)+(q/2+1/2)^2 *log(q/2+1/2)- (3*q/4 -1)*log(1-3*q/4)- (3*q/4+1/4)*log(3*q/4+1/4)) + 0.7213*(q*log(q/2)* ( -q-3/2 +1/q)+ (-q-1)*log(q/2 +1/2) + q*(-q/2+1/2)*log(1/2-q/2)-3*log(1-q/2)-(q-1)*log(1/2 - q/2)) -0.36 *((q-1)^2*log(1/2 - q/2)));
>>solve(ex,q)
ans =
- 3.7601288392107154402269169733539 + 0.46896675884329957486140629064384*i
Hello,
Could you guys help me the solve following problem. This is the dispersion equation for a symmetric lamb wave. I am looking for the z values for different f (frequencies)? I have to find something similar to Fig 1 a.
close all
clear all
clc
%cl longitudunal wave speed
%ct transversal wave speed
%cp phase velocity of wave
%cg group velocity of wave
% z=ct/cp;
pi=3.14;
nu=0.33;% poisson ratio
ro=2700;%density kg/m3
E=70e9;% elastic modulus Pa
mu=E/(2*(1+nu)); %shear modulus
cl=((E*(1-nu))/(ro*(1+nu)*(1-2*nu)))^(0.5);
ct=(mu/ro).^(0.5);
k=ct/cl;
f=10:10:3e6;
w=2*pi*f;
d=(w*0.8e-3)/ct;
fzero (@(z) (2*z.^2-1).^2*(sin(sqrt((1-z.^2))*d))*cos(sqrt((k.^2-z.^2.*d)))-(sin(sqrt (k.^2-z.^2.*d)))*cos(sqrt((1-z.^2))*d)*(4*z.^2)*sqrt(1-z.^2)*sqrt(k.^2-z.^2),1)

2 Comments

Please start a new Question for this topic.
I have started a new question
https://www.mathworks.com/matlabcentral/answers/336873-nonlinear-tangent-trigonemetric-equation

Sign in to comment.

Asked:

cm
on 18 Nov 2013

Edited:

on 23 Apr 2017

Community Treasure Hunt

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

Start Hunting!