Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6170

Re: Simple DSolve equation

From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Simple DSolve equation
Date 2011-11-04 11:05 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j90guf$slb$1@smc.vnet.net> (permalink)
References <201111030846.DAA15245@smc.vnet.net>

Show all headers | View raw


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@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@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Simple DSolve equation DrMajorBob <btreat1@austin.rr.com> - 2011-11-04 11:05 +0000

csiph-web