How to using the method of undetermined coefficients in this equation?
$begingroup$
I want to find the rational numbers $a$, $b$, $c$ satisfying the condition
$$displaystyle int _ { 5 } ^ { 21 } frac { mathrm { d } x } { x cdot sqrt { x + 4 } } = a ln 3 + b ln 5 + c ln 7.$$
I solve by hand.
Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}]
1/2 Log[15/7]
From here, I got, $ a = dfrac{1}{2} $, $ b = dfrac{1}{2} $, $ c = -dfrac{1}{2} .$
How can I tell Mathematica to do that?
With Maple, I got the answer directly
equation-solving coefficients
$endgroup$
add a comment |
$begingroup$
I want to find the rational numbers $a$, $b$, $c$ satisfying the condition
$$displaystyle int _ { 5 } ^ { 21 } frac { mathrm { d } x } { x cdot sqrt { x + 4 } } = a ln 3 + b ln 5 + c ln 7.$$
I solve by hand.
Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}]
1/2 Log[15/7]
From here, I got, $ a = dfrac{1}{2} $, $ b = dfrac{1}{2} $, $ c = -dfrac{1}{2} .$
How can I tell Mathematica to do that?
With Maple, I got the answer directly
equation-solving coefficients
$endgroup$
3
$begingroup$
You're just calculating the integral rather than solving the equation in Maple. If such results are desired for you, simplyIntegrate[1/(x Sqrt[x + 4]), {x, 5, 21}] // PowerExpand // Expand
.
$endgroup$
– xzczd
Feb 12 at 8:46
$begingroup$
Thank you very much.
$endgroup$
– minhthien_2016
Feb 12 at 8:52
add a comment |
$begingroup$
I want to find the rational numbers $a$, $b$, $c$ satisfying the condition
$$displaystyle int _ { 5 } ^ { 21 } frac { mathrm { d } x } { x cdot sqrt { x + 4 } } = a ln 3 + b ln 5 + c ln 7.$$
I solve by hand.
Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}]
1/2 Log[15/7]
From here, I got, $ a = dfrac{1}{2} $, $ b = dfrac{1}{2} $, $ c = -dfrac{1}{2} .$
How can I tell Mathematica to do that?
With Maple, I got the answer directly
equation-solving coefficients
$endgroup$
I want to find the rational numbers $a$, $b$, $c$ satisfying the condition
$$displaystyle int _ { 5 } ^ { 21 } frac { mathrm { d } x } { x cdot sqrt { x + 4 } } = a ln 3 + b ln 5 + c ln 7.$$
I solve by hand.
Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}]
1/2 Log[15/7]
From here, I got, $ a = dfrac{1}{2} $, $ b = dfrac{1}{2} $, $ c = -dfrac{1}{2} .$
How can I tell Mathematica to do that?
With Maple, I got the answer directly
equation-solving coefficients
equation-solving coefficients
edited Feb 12 at 8:40
minhthien_2016
asked Feb 12 at 7:23
minhthien_2016minhthien_2016
573311
573311
3
$begingroup$
You're just calculating the integral rather than solving the equation in Maple. If such results are desired for you, simplyIntegrate[1/(x Sqrt[x + 4]), {x, 5, 21}] // PowerExpand // Expand
.
$endgroup$
– xzczd
Feb 12 at 8:46
$begingroup$
Thank you very much.
$endgroup$
– minhthien_2016
Feb 12 at 8:52
add a comment |
3
$begingroup$
You're just calculating the integral rather than solving the equation in Maple. If such results are desired for you, simplyIntegrate[1/(x Sqrt[x + 4]), {x, 5, 21}] // PowerExpand // Expand
.
$endgroup$
– xzczd
Feb 12 at 8:46
$begingroup$
Thank you very much.
$endgroup$
– minhthien_2016
Feb 12 at 8:52
3
3
$begingroup$
You're just calculating the integral rather than solving the equation in Maple. If such results are desired for you, simply
Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] // PowerExpand // Expand
.$endgroup$
– xzczd
Feb 12 at 8:46
$begingroup$
You're just calculating the integral rather than solving the equation in Maple. If such results are desired for you, simply
Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] // PowerExpand // Expand
.$endgroup$
– xzczd
Feb 12 at 8:46
$begingroup$
Thank you very much.
$endgroup$
– minhthien_2016
Feb 12 at 8:52
$begingroup$
Thank you very much.
$endgroup$
– minhthien_2016
Feb 12 at 8:52
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
{a/d, b/e, c/f} /.
FindInstance[Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] ==
a Log[3]/d + b Log[5]/e + c Log[7]/f, {a, b, c, d, e, f}, Integers]
{{1/2, 1/2, -(1/2)}}
$endgroup$
$begingroup$
How about equation? I don't get the result?Clear[a, b, c, d, e, f] {a/d, b/e} /. FindInstance[ Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, {a, d, b, e}, Integers]
$endgroup$
– minhthien_2016
Feb 12 at 8:01
3
$begingroup$
@minhthien_2016, as the message says, The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist. You can tryReduce
: for example,Reduce[{Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, And @@ Thread[-5 <= {a, d, b, e} <= 5]}, {a, d, b, e}, Integers]
gives a solution.
$endgroup$
– kglr
Feb 12 at 8:23
$begingroup$
1/4 Log[27/11]
can be written3/4 Log[3] - 1/4 Log[11]
$endgroup$
– minhthien_2016
Feb 12 at 8:32
add a comment |
$begingroup$
Not as automated as kglr's solution, but the following works:
eq = Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] == a Log@3 + b Log@5 + c Log@7
(* 1/2 Log[15/7] == a Log[3] + b Log[5] + c Log[7] *)
PowerExpand@eq
(* 1/2 (Log[3] + Log[5] - Log[7]) == a Log[3] + b Log[5] + c Log[7] *)
Collect[Subtract @@ %, Log[_]] == 0
(* (1/2 - a) Log[3] + (1/2 - b) Log[5] + (-(1/2) - c) Log[7] == 0 *)
Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
(* {a -> 1/2, b -> 1/2, c -> -(1/2)} *)
This method also handles the new added example Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3] + b Log[11]
.
$endgroup$
$begingroup$
When I triedeq1 = Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log@3 + b Log@5; PowerExpand@eq1; Collect[Subtract @@ %, Log[_]] == 0; Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
I got{a -> 3/4, b -> 0}
. I think, It is wrong.
$endgroup$
– minhthien_2016
Feb 12 at 9:02
$begingroup$
@minhthien_2016 The equation itself is wrong. TheLog@5
should beLog@11
.
$endgroup$
– xzczd
Feb 12 at 9:08
$begingroup$
Yes. I think, the answer, It can not be found.
$endgroup$
– minhthien_2016
Feb 12 at 9:09
$begingroup$
As already mentioned, this solution is not a fully automated solution, error handling should be done manually.
$endgroup$
– xzczd
Feb 12 at 9:13
$begingroup$
I am looking forward to a genenral method.
$endgroup$
– minhthien_2016
Feb 12 at 9:14
|
show 1 more comment
$begingroup$
I am interpreting your question to mean that you want logarithms of rational numbers to be expressed purely in terms of logarithms of primes. If so, one can use a replacement rule:
{Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}],
Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}]} // Simplify
{1/2 Log[15/7], 1/4 Log[27/11]}
% /. Log[r_Rational] :> (Total[#2 Log[#1] & @@@ FactorInteger[Numerator[r]]] -
Total[#2 Log[#1] & @@@ FactorInteger[Denominator[r]]]) // Expand
{Log[3]/2 + Log[5]/2 - Log[7]/2, 3 Log[3]/4 - Log[11]/4}
Alternatively, one can use FindIntegerNullVector
, similar to what was done in this answer:
-Rest[#]/First[#] &[FindIntegerNullVector[{1/2 Log[15/7], Log[3], Log[5], Log[7]}]]
{1/2, 1/2, -1/2}
-Rest[#]/First[#] &[FindIntegerNullVector[{1/4 Log[27/11], Log[3], Log[11]}]]
{3/4, -1/4}
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f191367%2fhow-to-using-the-method-of-undetermined-coefficients-in-this-equation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
{a/d, b/e, c/f} /.
FindInstance[Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] ==
a Log[3]/d + b Log[5]/e + c Log[7]/f, {a, b, c, d, e, f}, Integers]
{{1/2, 1/2, -(1/2)}}
$endgroup$
$begingroup$
How about equation? I don't get the result?Clear[a, b, c, d, e, f] {a/d, b/e} /. FindInstance[ Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, {a, d, b, e}, Integers]
$endgroup$
– minhthien_2016
Feb 12 at 8:01
3
$begingroup$
@minhthien_2016, as the message says, The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist. You can tryReduce
: for example,Reduce[{Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, And @@ Thread[-5 <= {a, d, b, e} <= 5]}, {a, d, b, e}, Integers]
gives a solution.
$endgroup$
– kglr
Feb 12 at 8:23
$begingroup$
1/4 Log[27/11]
can be written3/4 Log[3] - 1/4 Log[11]
$endgroup$
– minhthien_2016
Feb 12 at 8:32
add a comment |
$begingroup$
{a/d, b/e, c/f} /.
FindInstance[Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] ==
a Log[3]/d + b Log[5]/e + c Log[7]/f, {a, b, c, d, e, f}, Integers]
{{1/2, 1/2, -(1/2)}}
$endgroup$
$begingroup$
How about equation? I don't get the result?Clear[a, b, c, d, e, f] {a/d, b/e} /. FindInstance[ Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, {a, d, b, e}, Integers]
$endgroup$
– minhthien_2016
Feb 12 at 8:01
3
$begingroup$
@minhthien_2016, as the message says, The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist. You can tryReduce
: for example,Reduce[{Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, And @@ Thread[-5 <= {a, d, b, e} <= 5]}, {a, d, b, e}, Integers]
gives a solution.
$endgroup$
– kglr
Feb 12 at 8:23
$begingroup$
1/4 Log[27/11]
can be written3/4 Log[3] - 1/4 Log[11]
$endgroup$
– minhthien_2016
Feb 12 at 8:32
add a comment |
$begingroup$
{a/d, b/e, c/f} /.
FindInstance[Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] ==
a Log[3]/d + b Log[5]/e + c Log[7]/f, {a, b, c, d, e, f}, Integers]
{{1/2, 1/2, -(1/2)}}
$endgroup$
{a/d, b/e, c/f} /.
FindInstance[Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] ==
a Log[3]/d + b Log[5]/e + c Log[7]/f, {a, b, c, d, e, f}, Integers]
{{1/2, 1/2, -(1/2)}}
answered Feb 12 at 7:32
kglrkglr
190k10206424
190k10206424
$begingroup$
How about equation? I don't get the result?Clear[a, b, c, d, e, f] {a/d, b/e} /. FindInstance[ Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, {a, d, b, e}, Integers]
$endgroup$
– minhthien_2016
Feb 12 at 8:01
3
$begingroup$
@minhthien_2016, as the message says, The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist. You can tryReduce
: for example,Reduce[{Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, And @@ Thread[-5 <= {a, d, b, e} <= 5]}, {a, d, b, e}, Integers]
gives a solution.
$endgroup$
– kglr
Feb 12 at 8:23
$begingroup$
1/4 Log[27/11]
can be written3/4 Log[3] - 1/4 Log[11]
$endgroup$
– minhthien_2016
Feb 12 at 8:32
add a comment |
$begingroup$
How about equation? I don't get the result?Clear[a, b, c, d, e, f] {a/d, b/e} /. FindInstance[ Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, {a, d, b, e}, Integers]
$endgroup$
– minhthien_2016
Feb 12 at 8:01
3
$begingroup$
@minhthien_2016, as the message says, The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist. You can tryReduce
: for example,Reduce[{Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, And @@ Thread[-5 <= {a, d, b, e} <= 5]}, {a, d, b, e}, Integers]
gives a solution.
$endgroup$
– kglr
Feb 12 at 8:23
$begingroup$
1/4 Log[27/11]
can be written3/4 Log[3] - 1/4 Log[11]
$endgroup$
– minhthien_2016
Feb 12 at 8:32
$begingroup$
How about equation? I don't get the result?
Clear[a, b, c, d, e, f] {a/d, b/e} /. FindInstance[ Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, {a, d, b, e}, Integers]
$endgroup$
– minhthien_2016
Feb 12 at 8:01
$begingroup$
How about equation? I don't get the result?
Clear[a, b, c, d, e, f] {a/d, b/e} /. FindInstance[ Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, {a, d, b, e}, Integers]
$endgroup$
– minhthien_2016
Feb 12 at 8:01
3
3
$begingroup$
@minhthien_2016, as the message says, The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist. You can try
Reduce
: for example, Reduce[{Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, And @@ Thread[-5 <= {a, d, b, e} <= 5]}, {a, d, b, e}, Integers]
gives a solution.$endgroup$
– kglr
Feb 12 at 8:23
$begingroup$
@minhthien_2016, as the message says, The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist. You can try
Reduce
: for example, Reduce[{Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3]/d + b Log[11]/e, And @@ Thread[-5 <= {a, d, b, e} <= 5]}, {a, d, b, e}, Integers]
gives a solution.$endgroup$
– kglr
Feb 12 at 8:23
$begingroup$
1/4 Log[27/11]
can be written 3/4 Log[3] - 1/4 Log[11]
$endgroup$
– minhthien_2016
Feb 12 at 8:32
$begingroup$
1/4 Log[27/11]
can be written 3/4 Log[3] - 1/4 Log[11]
$endgroup$
– minhthien_2016
Feb 12 at 8:32
add a comment |
$begingroup$
Not as automated as kglr's solution, but the following works:
eq = Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] == a Log@3 + b Log@5 + c Log@7
(* 1/2 Log[15/7] == a Log[3] + b Log[5] + c Log[7] *)
PowerExpand@eq
(* 1/2 (Log[3] + Log[5] - Log[7]) == a Log[3] + b Log[5] + c Log[7] *)
Collect[Subtract @@ %, Log[_]] == 0
(* (1/2 - a) Log[3] + (1/2 - b) Log[5] + (-(1/2) - c) Log[7] == 0 *)
Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
(* {a -> 1/2, b -> 1/2, c -> -(1/2)} *)
This method also handles the new added example Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3] + b Log[11]
.
$endgroup$
$begingroup$
When I triedeq1 = Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log@3 + b Log@5; PowerExpand@eq1; Collect[Subtract @@ %, Log[_]] == 0; Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
I got{a -> 3/4, b -> 0}
. I think, It is wrong.
$endgroup$
– minhthien_2016
Feb 12 at 9:02
$begingroup$
@minhthien_2016 The equation itself is wrong. TheLog@5
should beLog@11
.
$endgroup$
– xzczd
Feb 12 at 9:08
$begingroup$
Yes. I think, the answer, It can not be found.
$endgroup$
– minhthien_2016
Feb 12 at 9:09
$begingroup$
As already mentioned, this solution is not a fully automated solution, error handling should be done manually.
$endgroup$
– xzczd
Feb 12 at 9:13
$begingroup$
I am looking forward to a genenral method.
$endgroup$
– minhthien_2016
Feb 12 at 9:14
|
show 1 more comment
$begingroup$
Not as automated as kglr's solution, but the following works:
eq = Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] == a Log@3 + b Log@5 + c Log@7
(* 1/2 Log[15/7] == a Log[3] + b Log[5] + c Log[7] *)
PowerExpand@eq
(* 1/2 (Log[3] + Log[5] - Log[7]) == a Log[3] + b Log[5] + c Log[7] *)
Collect[Subtract @@ %, Log[_]] == 0
(* (1/2 - a) Log[3] + (1/2 - b) Log[5] + (-(1/2) - c) Log[7] == 0 *)
Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
(* {a -> 1/2, b -> 1/2, c -> -(1/2)} *)
This method also handles the new added example Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3] + b Log[11]
.
$endgroup$
$begingroup$
When I triedeq1 = Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log@3 + b Log@5; PowerExpand@eq1; Collect[Subtract @@ %, Log[_]] == 0; Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
I got{a -> 3/4, b -> 0}
. I think, It is wrong.
$endgroup$
– minhthien_2016
Feb 12 at 9:02
$begingroup$
@minhthien_2016 The equation itself is wrong. TheLog@5
should beLog@11
.
$endgroup$
– xzczd
Feb 12 at 9:08
$begingroup$
Yes. I think, the answer, It can not be found.
$endgroup$
– minhthien_2016
Feb 12 at 9:09
$begingroup$
As already mentioned, this solution is not a fully automated solution, error handling should be done manually.
$endgroup$
– xzczd
Feb 12 at 9:13
$begingroup$
I am looking forward to a genenral method.
$endgroup$
– minhthien_2016
Feb 12 at 9:14
|
show 1 more comment
$begingroup$
Not as automated as kglr's solution, but the following works:
eq = Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] == a Log@3 + b Log@5 + c Log@7
(* 1/2 Log[15/7] == a Log[3] + b Log[5] + c Log[7] *)
PowerExpand@eq
(* 1/2 (Log[3] + Log[5] - Log[7]) == a Log[3] + b Log[5] + c Log[7] *)
Collect[Subtract @@ %, Log[_]] == 0
(* (1/2 - a) Log[3] + (1/2 - b) Log[5] + (-(1/2) - c) Log[7] == 0 *)
Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
(* {a -> 1/2, b -> 1/2, c -> -(1/2)} *)
This method also handles the new added example Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3] + b Log[11]
.
$endgroup$
Not as automated as kglr's solution, but the following works:
eq = Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] == a Log@3 + b Log@5 + c Log@7
(* 1/2 Log[15/7] == a Log[3] + b Log[5] + c Log[7] *)
PowerExpand@eq
(* 1/2 (Log[3] + Log[5] - Log[7]) == a Log[3] + b Log[5] + c Log[7] *)
Collect[Subtract @@ %, Log[_]] == 0
(* (1/2 - a) Log[3] + (1/2 - b) Log[5] + (-(1/2) - c) Log[7] == 0 *)
Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
(* {a -> 1/2, b -> 1/2, c -> -(1/2)} *)
This method also handles the new added example Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log[3] + b Log[11]
.
answered Feb 12 at 8:29
xzczdxzczd
27.7k574257
27.7k574257
$begingroup$
When I triedeq1 = Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log@3 + b Log@5; PowerExpand@eq1; Collect[Subtract @@ %, Log[_]] == 0; Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
I got{a -> 3/4, b -> 0}
. I think, It is wrong.
$endgroup$
– minhthien_2016
Feb 12 at 9:02
$begingroup$
@minhthien_2016 The equation itself is wrong. TheLog@5
should beLog@11
.
$endgroup$
– xzczd
Feb 12 at 9:08
$begingroup$
Yes. I think, the answer, It can not be found.
$endgroup$
– minhthien_2016
Feb 12 at 9:09
$begingroup$
As already mentioned, this solution is not a fully automated solution, error handling should be done manually.
$endgroup$
– xzczd
Feb 12 at 9:13
$begingroup$
I am looking forward to a genenral method.
$endgroup$
– minhthien_2016
Feb 12 at 9:14
|
show 1 more comment
$begingroup$
When I triedeq1 = Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log@3 + b Log@5; PowerExpand@eq1; Collect[Subtract @@ %, Log[_]] == 0; Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
I got{a -> 3/4, b -> 0}
. I think, It is wrong.
$endgroup$
– minhthien_2016
Feb 12 at 9:02
$begingroup$
@minhthien_2016 The equation itself is wrong. TheLog@5
should beLog@11
.
$endgroup$
– xzczd
Feb 12 at 9:08
$begingroup$
Yes. I think, the answer, It can not be found.
$endgroup$
– minhthien_2016
Feb 12 at 9:09
$begingroup$
As already mentioned, this solution is not a fully automated solution, error handling should be done manually.
$endgroup$
– xzczd
Feb 12 at 9:13
$begingroup$
I am looking forward to a genenral method.
$endgroup$
– minhthien_2016
Feb 12 at 9:14
$begingroup$
When I tried
eq1 = Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log@3 + b Log@5; PowerExpand@eq1; Collect[Subtract @@ %, Log[_]] == 0; Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
I got {a -> 3/4, b -> 0}
. I think, It is wrong.$endgroup$
– minhthien_2016
Feb 12 at 9:02
$begingroup$
When I tried
eq1 = Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}] == a Log@3 + b Log@5; PowerExpand@eq1; Collect[Subtract @@ %, Log[_]] == 0; Cases[%, coe_ Log[_] :> Solve[coe == 0], Infinity] // Flatten
I got {a -> 3/4, b -> 0}
. I think, It is wrong.$endgroup$
– minhthien_2016
Feb 12 at 9:02
$begingroup$
@minhthien_2016 The equation itself is wrong. The
Log@5
should be Log@11
.$endgroup$
– xzczd
Feb 12 at 9:08
$begingroup$
@minhthien_2016 The equation itself is wrong. The
Log@5
should be Log@11
.$endgroup$
– xzczd
Feb 12 at 9:08
$begingroup$
Yes. I think, the answer, It can not be found.
$endgroup$
– minhthien_2016
Feb 12 at 9:09
$begingroup$
Yes. I think, the answer, It can not be found.
$endgroup$
– minhthien_2016
Feb 12 at 9:09
$begingroup$
As already mentioned, this solution is not a fully automated solution, error handling should be done manually.
$endgroup$
– xzczd
Feb 12 at 9:13
$begingroup$
As already mentioned, this solution is not a fully automated solution, error handling should be done manually.
$endgroup$
– xzczd
Feb 12 at 9:13
$begingroup$
I am looking forward to a genenral method.
$endgroup$
– minhthien_2016
Feb 12 at 9:14
$begingroup$
I am looking forward to a genenral method.
$endgroup$
– minhthien_2016
Feb 12 at 9:14
|
show 1 more comment
$begingroup$
I am interpreting your question to mean that you want logarithms of rational numbers to be expressed purely in terms of logarithms of primes. If so, one can use a replacement rule:
{Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}],
Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}]} // Simplify
{1/2 Log[15/7], 1/4 Log[27/11]}
% /. Log[r_Rational] :> (Total[#2 Log[#1] & @@@ FactorInteger[Numerator[r]]] -
Total[#2 Log[#1] & @@@ FactorInteger[Denominator[r]]]) // Expand
{Log[3]/2 + Log[5]/2 - Log[7]/2, 3 Log[3]/4 - Log[11]/4}
Alternatively, one can use FindIntegerNullVector
, similar to what was done in this answer:
-Rest[#]/First[#] &[FindIntegerNullVector[{1/2 Log[15/7], Log[3], Log[5], Log[7]}]]
{1/2, 1/2, -1/2}
-Rest[#]/First[#] &[FindIntegerNullVector[{1/4 Log[27/11], Log[3], Log[11]}]]
{3/4, -1/4}
$endgroup$
add a comment |
$begingroup$
I am interpreting your question to mean that you want logarithms of rational numbers to be expressed purely in terms of logarithms of primes. If so, one can use a replacement rule:
{Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}],
Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}]} // Simplify
{1/2 Log[15/7], 1/4 Log[27/11]}
% /. Log[r_Rational] :> (Total[#2 Log[#1] & @@@ FactorInteger[Numerator[r]]] -
Total[#2 Log[#1] & @@@ FactorInteger[Denominator[r]]]) // Expand
{Log[3]/2 + Log[5]/2 - Log[7]/2, 3 Log[3]/4 - Log[11]/4}
Alternatively, one can use FindIntegerNullVector
, similar to what was done in this answer:
-Rest[#]/First[#] &[FindIntegerNullVector[{1/2 Log[15/7], Log[3], Log[5], Log[7]}]]
{1/2, 1/2, -1/2}
-Rest[#]/First[#] &[FindIntegerNullVector[{1/4 Log[27/11], Log[3], Log[11]}]]
{3/4, -1/4}
$endgroup$
add a comment |
$begingroup$
I am interpreting your question to mean that you want logarithms of rational numbers to be expressed purely in terms of logarithms of primes. If so, one can use a replacement rule:
{Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}],
Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}]} // Simplify
{1/2 Log[15/7], 1/4 Log[27/11]}
% /. Log[r_Rational] :> (Total[#2 Log[#1] & @@@ FactorInteger[Numerator[r]]] -
Total[#2 Log[#1] & @@@ FactorInteger[Denominator[r]]]) // Expand
{Log[3]/2 + Log[5]/2 - Log[7]/2, 3 Log[3]/4 - Log[11]/4}
Alternatively, one can use FindIntegerNullVector
, similar to what was done in this answer:
-Rest[#]/First[#] &[FindIntegerNullVector[{1/2 Log[15/7], Log[3], Log[5], Log[7]}]]
{1/2, 1/2, -1/2}
-Rest[#]/First[#] &[FindIntegerNullVector[{1/4 Log[27/11], Log[3], Log[11]}]]
{3/4, -1/4}
$endgroup$
I am interpreting your question to mean that you want logarithms of rational numbers to be expressed purely in terms of logarithms of primes. If so, one can use a replacement rule:
{Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}],
Integrate[1/(x Sqrt[x + 16]), {x, 9, 33}]} // Simplify
{1/2 Log[15/7], 1/4 Log[27/11]}
% /. Log[r_Rational] :> (Total[#2 Log[#1] & @@@ FactorInteger[Numerator[r]]] -
Total[#2 Log[#1] & @@@ FactorInteger[Denominator[r]]]) // Expand
{Log[3]/2 + Log[5]/2 - Log[7]/2, 3 Log[3]/4 - Log[11]/4}
Alternatively, one can use FindIntegerNullVector
, similar to what was done in this answer:
-Rest[#]/First[#] &[FindIntegerNullVector[{1/2 Log[15/7], Log[3], Log[5], Log[7]}]]
{1/2, 1/2, -1/2}
-Rest[#]/First[#] &[FindIntegerNullVector[{1/4 Log[27/11], Log[3], Log[11]}]]
{3/4, -1/4}
edited Feb 18 at 1:44
answered Feb 18 at 1:26
J. M. is away♦J. M. is away
98.9k10311467
98.9k10311467
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f191367%2fhow-to-using-the-method-of-undetermined-coefficients-in-this-equation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
$begingroup$
You're just calculating the integral rather than solving the equation in Maple. If such results are desired for you, simply
Integrate[1/(x Sqrt[x + 4]), {x, 5, 21}] // PowerExpand // Expand
.$endgroup$
– xzczd
Feb 12 at 8:46
$begingroup$
Thank you very much.
$endgroup$
– minhthien_2016
Feb 12 at 8:52