Re: Simple DSolve equation
- To: mathgroup at smc.vnet.net
- Subject: [mg122640] Re: Simple DSolve equation
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Fri, 4 Nov 2011 06:00:47 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201111030846.DAA15245@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
a) The solution given is correct, and
b) You gave no restrictions on k. Nor did you ask for any, in Mathematica.
Here's a possible way to go about it:
Clear[y, k, m]
y =
y /. First@DSolve[{y''[x] == k y[x], y[0] == 0, y'[0] == m}, y, x]
Function[{x}, (E^(-Sqrt[k] x) (-1 + E^(2 Sqrt[k] x)) m)/(2 Sqrt[k])]
s1 = Quiet@Solve[y[10] == 0, {m, k}]
y[10] /. s1
Length@%
{{k -> -\[Pi]^2}, {k -> -((81 \[Pi]^2)/100)}, {k -> -((16 \[Pi]^2)/
25)}, {k -> -((49 \[Pi]^2)/100)}, {k -> -((9 \[Pi]^2)/
25)}, {k -> -(\[Pi]^2/4)}, {k -> -((4 \[Pi]^2)/25)}, {k -> -((
9 \[Pi]^2)/100)}, {k -> -(\[Pi]^2/25)}, {k -> -(\[Pi]^2/
100)}, {k -> Log[-(-1)^(1/10)]^2}, {k ->
Log[-(-1)^(1/5)]^2}, {k -> Log[-(-1)^(3/10)]^2}, {k ->
Log[-(-1)^(2/5)]^2}, {k -> Log[-(-1)^(3/5)]^2}, {k ->
Log[-(-1)^(7/10)]^2}, {k -> Log[-(-1)^(4/5)]^2}, {k ->
Log[-(-1)^(9/10)]^2}, {m -> 0}}
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
19
This indicates 18 k values that work for any m, and one m value that works
for any k.
The suppressed error message (remove Quiet) indicates OTHER solutions may
exist, but I think not.
Bobby
On Thu, 03 Nov 2011 03:46:30 -0500, Rui <rui.rojo at gmail.com> wrote:
> Why does something like this not give the correct answer with
> restrictions over k?
> How would you go about getting the right general solutions in these kind
> of basic differential equations?
>
> Thanks
>
> DSolve[{y''[x] == k y[x], y[0] == 0, y[10] == 0}, y[x], x]
> Out={{y[x] -> 0}}
>
--
DrMajorBob at yahoo.com
- References:
- Simple DSolve equation
- From: Rui <rui.rojo@gmail.com>
- Simple DSolve equation